On Thu, Sep 19, 2013 at 12:05:14PM -0700, [email protected] wrote:
>
> After calling @dashboard.storage_participant.proceed(workitem), what is the
> best way to check if ruote successfully proceeded to the next participant?

Hello Denis,

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

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
https://github.com/jmettraux/ruote/blob/7a26fdeaa362/test/functional/eft_14_cursor.rb#L400-L421

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
reached it.

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


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.

Reply via email to