On Thu, Jul 01, 2010 at 01:16:44AM +0200, Gonzalo Suarez wrote:
>
> So as far as I understand... it should be fine to keep a state
> attribute for some entities tweaked during a workflow.
Hello Gonzalo,
yes, exactly.
> You may have a workflow that describes a packet delivery:
>
> The entity packet is made of many attributes like sender, insurance,
> destination, etc. But status could be an attribute too. Status could
> take the values: processing, in transit, delivered, etc... The status
> is changed by the logic modeled as a ruote process. Everytime the
> entity changes its status, the database is updated so any other app
> using the same DB/repository is able to know that info too. No need to
> check the engine for that. It could be too expensive to check the DB
> and the engine's workitems looking for packet entities and then merge
> the results...?¿
>
> Here I think the workflow logic is not mixed with the entity life
> cycle.... maybe I'm wrong... I feel a bit lost here. Don't know what
> is a good design for keeping an entity repository (MySQL, MongoDB,
> etc...) updated with the entities living inside the workitems.
Maybe it's not good to have entities living inside the workitems.
I have workitems that contain pointers (ids, URLs, ...) to entities, and
workitems that contain fragments of data. Those fragments are
integrated/merged/used to create entities at some point or it's simply help
data for routing (cached data / cached entities).
These days I'm working on two systems where workitems are issued to
participants to grant them the right / task to modify entities. The workitems
only contain the id of the entity. Since it's a rails environment, I've made
sure that those workitems are redirected to the edition screen of the entity /
resource.
For example, my workitem
{ 'fields' => { 'audit_id' => 12345 } }
will redirect me to
/audits/12345/edit?wid=20100701-abcd!!0_1
note the ?wid=... which is passed to let the system know that the edition is
done in a workitem/workflow context.
With this wid in the query string, I can add (save) and (proceed) buttons so
that the entities is updated AND the workitem proceeds in the workflow or not.
This is just a small technique but it works well for me.
Best regards,
--
John Mettraux - http://jmettraux.wordpress.com
--
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