Thanks for this quick reply! With referring participants like "participant :ref => 'aa'" everything works fine on my machine as well!
Have a nice weekend! Am Mittwoch, 28. November 2012 20:50:53 UTC+1 schrieb Tobi: > > Hi to the Mailing List, > > i am trying to implement some workflow control patterns with ruote (2.3.0). > I followed the quickstart at > https://github.com/jmettraux/ruote/tree/master/quickstart and had no > problems to get it started so far. > > But when trying to implement some control patterns, they seem to be > ignored and i don“t know why. > > For example i tried to use the jump :to command like described at > http://ruote.rubyforge.org/exp/cursor.html > > My process definition looks like that: > > pdef = Ruote.define do > > cursor do > participant 'aa' > participant 'bb' > participant 'cc' > echo '${f:go_to_e}' > jump :to => 'ee', :if => '${f:go_to_e}' > participant 'dd' > participant 'ee' > jump :to => 'cc', :if => '${f:back_to_c}' > echo '${f:back_to_c}' > end > > end > > Within the participants cc & ee the workitems go_to_e and back_to_c are > set to "true" but the order in which the participants are called, is: > aa > bb > cc > true > dd > ee > true > > and i would have expected something like > > aa > bb > cc > true > bb > ... > > Attached you can find my complete code. > Maybe you can tell me what went wrong. > I was trying the same stuff also with loops (repeat do) but with the same > results. > > Thanks a lot in advance! > > Tobi > > require 'rufus-json/automatic' > require 'ruote' > require 'ruote/storage/fs_storage' > > ruote = Ruote::Dashboard.new( > Ruote::Worker.new( > Ruote::FsStorage.new('ruote_work'))) > > ruote.noisy = ENV['NOISY'] == 'true' > > class Aa < Ruote::Participant > def on_workitem > puts participant_name > reply > end > end > > class Bb < Ruote::Participant > def on_workitem > puts participant_name > reply > end > end > > class Cc < Ruote::Participant > def on_workitem > puts participant_name > workitem.fields['go_to_e'] = true > reply > end > end > > class Dd < Ruote::Participant > def on_workitem > puts participant_name > reply > end > end > > class Ee < Ruote::Participant > def on_workitem > puts participant_name > workitem.fields['back_to_c'] = true > reply > end > end > > ruote.register 'aa', Aa > ruote.register 'bb', Bb > ruote.register 'cc', Cc > ruote.register 'dd', Dd > ruote.register 'ee', Ee > > pdef = Ruote.define do > > cursor do > participant 'aa' > participant 'bb' > participant 'cc' > echo '${f:go_to_e}' > jump :to => 'ee', :if => '${f:go_to_e}' > participant 'dd' > participant 'ee' > jump :to => 'cc', :if => '${f:back_to_c}' > echo '${f:back_to_c}' > end > > end > > wfid = ruote.launch(pdef) > > ruote.wait_for(wfid) > > -- you received this message because you are subscribed to the "ruote users" group. to post : send email to [email protected] to unsubscribe : send email to [email protected] more options : http://groups.google.com/group/openwferu-users?hl=en
