Carl Shimer wrote:

> I am writing some prototype code using Ruote.  I am trying to
> understand how to coordinate a workflow using some kind of participant
> ID.
> 
> This is my scenario:
> 
> 1) Create a worflow instance with engine.launch(...)
> 2) A participant task emails a user with a link to a form.  embedded
> in that URL is an identifier that maps back to a form.  Example:
> foo.com/survey/49/?wfid=abc.  In this case I am using a custom
> Participant that doesn't return immediately to engine, e.g the consume
> method send email but does not call return_to_engine.
> 3) User fills out form.
> 4) web server records the form response and tells the workflow to
> continue.

That's a quite common scenario, I'd say.

> How do I do step 4?  In other words, how do I tell the engine with a
> specific workflow ID that a specific participant should now complete?
> I see that I can lookup a workflow instance by the wfid, but I can't
> see how to invoke a specific participant to continue processing.

I'd suggest that you should handle different tasks with different
participants. Sending a mail to the user is a task, waiting for the
user's reply is another:

sequence do
  send_notification_to_user
  user_fill_form
end

That way, you can use the participant implementations shipped with
ruote: SmtpParticipant for the notifications and StorageParticipant for
waiting until the user has filled the form.

Use the StorageParticipant as example if you really want to write an own
participant. The docs are at
http://ruote.rubyforge.org/part/storage_participant.html.

HTH,
Torsten

-- 
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

Reply via email to