This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'ruote' | |
class Alpha < ::Ruote::Participant | |
def on_workitem | |
n = workitem.fields["iteration"].nil? ? 1 : workitem.fields["iteration"] + 1 | |
workitem.set_field("iteration", n) | |
workitem.set_field("completed", true) if n >= 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'json' | |
require 'ruote' | |
require 'ruote/storage/fs_storage' | |
require 'pp' | |
abort("Usage: ack.rb <wfid>") if ARGV[0].nil? | |
wfid = ARGV[0] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'json' | |
require 'ruote' | |
require 'ruote/storage/fs_storage' | |
@ruote = Ruote::Dashboard.new(Ruote::Worker.new(Ruote::FsStorage.new("/tmp/ruote_storage"))) | |
class Alpha < ::Ruote::Participant |