On Tue, Dec 21, 2010 at 07:25:19PM -0800, Copper Hill wrote:
>
> I'm curious of using these participant directly in process definition
> without registering them.
Hello Copper,
alpha, bravo and charly are example names.
---8<---
sequence do
a
b
c
end
sequence do
alice
bob
charly
end
sequence do
alpha
bravo
charly
end
sequence do
cto
cfo
ceo
end
--->8---
http://en.wikipedia.org/wiki/Nato_alphabet
Apart from examples, I also use alpha, bravo and charly in tests.
Also, please note how the participants are registered in those examples :
---8<---
require 'rubygems'
require 'ruote'
engine = Ruote::Engine.new(Ruote::Worker.new(Ruote::HashStorage.new))
class MyParticipant
include Ruote::LocalParticipant
def consume(workitem)
p workitem.participant_name
reply_to_engine(workitem)
end
end
engine.register '.+', MyParticipant
# or
#engine.register /^.+$/, MyParticipant
# or
#engine.register do
# catchall MyParticipant
#end
wfid = engine.launch(Ruote.define do
alpha
bravo
charly
end)
engine.wait_for(wfid)
--->8---
Best regards,
--
John Mettraux - http://jmettraux.wordpress.com
--
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