On Sat, Jun 15, 2013 at 05:10:37PM -0400, Doug Bryant wrote: > > 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?
Hello, yes. It fetches the workitem from the workitem storage, whereas #workitems extracts the applied workitem from the expression in the expression storage. > 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. OK. > 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. I've added a note: https://github.com/jmettraux/ruote/commit/46409dc2bd04d37 The workitem returned by #workitems lacks the type, _id and _rev entries that would make it a complete "workitem document". When calling update() with such an incomplete document, the storage stumbles. This should help (other storage implementations seem to have such a check already in place): https://github.com/jmettraux/ruote/commit/2048bc6ad7 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.
