On Wed, Sep 18, 2013 at 02:03:01PM -0700, ypz wrote: > > Hi, Hello and welcome to ruote's mailing list.
> I am trying to figure out how to interact with a running process from > another process. After going through this mailing list, my understanding > is that I should use a StorageParticipant to manipulate the workitem of the > running process. If interacting means "process A asks process B about its opinion" then yes. "interacting" could also mean "process B terminates process A" or things like this. > For this purpose, I wrote two test scripts, one for > running a test process definition, and the other to manipulate a running > process's workitem. Please see https://gist.github.com/ypz/6614031 for > both scripts. > > After starting run_pdef.rb script, I can see from its output the process > is in the waiting loop as it supposed to. But when I run ack.rb script with > appropriate wfid of running process in another window, it can't find any > workitem for that process, therefore, nothing happens. > > Did I miss something important and obvious Ack.rb asks to the storage: "any workitem for this workflow", storage replies: "no, no workitems". Looking at run_pdef.rb, one can see that "wait_for_admin_ack" is not a storage participant. It does not place the workitem in the storage. Here is a rewrite of your gist (using bundler): https://gist.github.com/jmettraux/6617970 Like your original gist it keeps placing a workitem for the admin until the admin acknowledges. > or am I totally misunderstand > how to interact with a running process ? It's OK I think. You are not forced to use a storage participant, anything that lets process B looks at a workitem from process A is OK. Storage participant is convenient. The thing that is not good with your idea: process B has to know the wfid of process A. A better design is probably one where process B queries for whatever workitem in queue "admin" and proceeds them... Maybe you want process A to launch process B and wait for B's answer... Step back a few paces and look at the big picture. Best regards, -- John Mettraux - http://lambda.io/jmettraux -- -- 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 --- You received this message because you are subscribed to the Google Groups "ruote" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
