[rules-users] Resuming the Flow: SESSION_ID, PROCESS_INSTANCE_ID, WORKITEM_ID

Mauricio Salatino salaboy at gmail.com
Fri Mar 26 21:06:08 EDT 2010


yes.. but he was asking about signaling events, continuing custom work items
and human tasks..
that's why you see a lot of code snippets.

On Fri, Mar 26, 2010 at 8:56 PM, Kris Verlaenen <
Kris.Verlaenen at cs.kuleuven.be> wrote:

> You should basically only know the workItemId.  Whenever you have some
> task that needs to be executed externally (and could take some time), a
> new work item will be created.  When that work is finished, the work
> item manager should be notified (using
> manager.completeWorkItem(workItem.getId(), null)).
>
> If you need to know what work needs to be completed, you should probably
> make sure that your work item handler knows this.  For example, our work
> item handler implementation for human tasks creates a new task in the
> database every time a human task work item needs to be executed (and
> stores the associated work item id in the db as well).  That allows a
> user to ask the human task service for all tasks that still need to be
> executed.  If the user completes the task, the manager is also signaled
> that the work item has been completed (using manager.completeWorkItem).
>
> So while you could use the code fragments that other have provided in
> related mails already, I'm not sure you actually need those, as the
> handler should be storing most info and signal the completion of the
> work item using the work item id.
>
> Kris
>
> Quoting tolitius <webakaunt at gmail.com>:
>
> >
> > Hi Flow Crew,
> >
> >     This is about reloading the session and resuming the flow.
> >
> >     Let's say the flow reached one of its wait states, and was
> > persisted.
> >
> >     Two days later an "assigned actor" does his/her duties, and the
> > flow can
> > be resumed.
> >
> >     At this point, we need to call something, let's call it a
> > WorkflowService, that would have a resumeFlow( someBusinessId )
> > method that
> > will be called.
> >
> >     Here is where the question starts...
> >
> >     I understand there are three pieces in this puzzle: SESSION_ID,
> > PROCESS_INSTANCE_ID and WORKITEM_ID
> >
> >     I also understand that in order to resume the flow, I need to get
> > a hold
> > of that certain work item that is ready to be completed, and let the
> > flow
> > know it is completed.
> >
> >     But at the point, where I should resume the flow, I have no
> > reference to
> > neither SESSION_ID, PROCESS_INSTANCE_ID or WORKFLOW_ID.
> >
> >     1.  How are these three related to each other?
> >
> >     2.  How do I find these three associated IDs?
> >
> >     2.  Which one(s) do I need to resume the flow?
> >
> >     3.  If I (somehow) get the reference to SESSION and
> > PROCESS_INSTANCE
> > ids, how do I know which work item is ready to be completed?
> >
> > Thank you,
> > /Anatoly
> > --
> > View this message in context:
> >
>
> http://n3.nabble.com/Resuming-the-Flow-SESSION-ID-PROCESS-INSTANCE-ID-WORKITEM-ID-tp607507p607507.html
> > Sent from the Drools - User mailing list archive at Nabble.com.
> > _______________________________________________
> > rules-users mailing list
> > rules-users at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/rules-users
> >
>
>
>
>
> Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>



-- 
- http://salaboy.wordpress.com
- http://www.jbug.com.ar
- Salatino "Salaboy" Mauricio -
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20100326/b74ab618/attachment.html 


More information about the rules-users mailing list