On Thu, Sep 19, 2013 at 12:05:14PM -0700, denis....@bluewaterbrand.com
> After calling @dashboard.storage_participant.proceed(workitem), what is the
> best way to check if ruote successfully proceeded to the next participant?
short answer first.
There is no best way. What if there is no next participant?
> I tried following the method calls in the ruote source code to see if the
> proceed method (in Ruote::StorageParticipant) returns a value that would
> indicate this, but wasn't able to determine whether it does or not.
No, it doesn't not. The proceed method simply hands back the workitem to the
When you hand a package to the FedEx guy, he isn't able to tell you if the
package was successfully delivered to the recipient. (Well he is, the packet
hasn't been delivered yet, it's still in his hands).
Long answer now.
When testing, I do use Dashboard#wait_for(:participant_name) as in
When testing, I know what will happen next, so I wait explicitely for that
thing (reached participant, terminated, 1 step, ...) to happen.
But this is testing.
In production, if you start encoding expectations about the process
definition into the code, you'll end up having to modify the code as well
when making changes to the process definition.
I don't know what is your use case, let me make up one just for the sake of
this email response.
Participant A receives a workitem, he can choose between B and C (next
participant name). He chooses B. The UI you wrapped around that storage
participant / decision could then proceed the workitem and poll B or C
(StorageParticipant#by_participant(name)) to determine if the workitem
Aunt Maribel sent a package to Uncle Joe, she then calls repeatedly Uncle Joe
to determine if the packet arrived. "Maribel, dear sister, I fully
understand, me neither, no trust in the postal service..."
John Mettraux - http://lambda.io/jmettraux