Thank you for the clarification.  I didn't realize it was a previous
version of the workitem.  The updated documentation make it clearer.

So if the process_status#workitems returns the workitems as they were at
the time they were sent *out* to the participants, does the
process_status#stored_workitems return the workitems that are currently
*in* the participant?

I just notice the StorageParticipant has a #by_wfid method which seems to
be a viable way to fetch current workitems by wfid.  For this particular
case of having to update certain workitem fields in a running process, I
know the wfid ahead of time.   I ended up coding it the original way to
prevent having to keep track of an additional field identifier we use to
associate workflows with individual records.

Seeing now that process_status#workitems returns the workitem as they were
sent out, from the docs, I would expect #update(workitem) to return true
indicating the workitem is gone and a newer version available.  I never
figured out why it was erroring out.  When you find that issue, please let
me know.  I'm curious as to what it ultimately was.

Thanks again for the help.

Have a good weekend




On Fri, Jun 14, 2013 at 6:16 PM, John Mettraux <[email protected]> wrote:

>
> On Fri, Jun 14, 2013 at 09:22:32AM -0700, Doug Bryant wrote:
> > (nothing)
>
> Hello Doug,
>
> > We have a case where some fields on a running ruote process need to be
> > updated.  The use case is simply applying new or updated values to
> > specified workitem fields - no need to advance or alter the workflow
> > further than that.
> >
> > The StorageParticipant#update(workitem)  looked like it would do exactly
> > what was needed, but it results in an object being nil error.
> >
> > I was able to reproduce the error in a test which follows the basic steps
> > of how I was trying to apply an update.
> >
> > Error:
> >  1) Error:
> > test_update_workitem_alt(FtStorageParticipantTest):
> > NoMethodError: undefined method `[]' for nil:NilClass
> >     /Users/doug/src/ruote/lib/ruote/storage/hash_storage.rb:98:in `block
> in
> > get'
> >
> > (...)
>
> OK, so I have hopefully enhanced the warning on #workitems:
>
>   https://github.com/jmettraux/ruote/commit/8115610755d
>
>
> Here is your test reworked to use the storage participant in the way it was
> intended to be used:
>
>   https://gist.github.com/jmettraux/5785678
>
> I will investigate the first error you encountered even if it resulted
> from a
> storage participant misuse. Since #workitems returns the workitems as they
> were right when the participant got applied (before dispatchment), they're
> probably still flagged with the fei of the parent expression.
>
>
> Best regards, have a nice week-end,
>
> --
> 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.
>
>
>

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