Created
January 12, 2012 03:22
-
-
Save chrisconley/1598359 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
config.after_initialize do | |
::RuoteEngine = Ruote::Engine.new( | |
Ruote::Worker.new( | |
Ruote::Redis::RedisStorage.new(::REDIS))) | |
RuoteEngine.register_participant :turk_unit, TurkUnitParticipant | |
RuoteEngine.register_participant :weighted_consensus, WeightedConsensusParticipant | |
RuoteEngine.register_participant :printer do |workitem| | |
puts workitem.fields['decisions']['default']['output'].inspect | |
end | |
end |
This file contains hidden or 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
Ruote.process_definition :name => 'DefaultWorkflow' do | |
cursor do | |
participant :unit, "step_name" => "default", "input" => "${f:task.input}" | |
participant :weighted_consensus, "step_name" => "default" | |
rewind :unless => '${f:decisions.default.ok}' | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment