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

Mauricio Salatino salaboy at gmail.com
Fri Mar 26 08:13:37 EDT 2010


Hi guys,
If you have the session and the process ID you can get the work item ID
using something like:

((WorkItemNode)processInstance.getNodeInstances().iterator().next()).getWorkItemId();

If you need to fire an event, sometimes you need the process instance id and
sometimes not, it depends on how you define the event (external or
internal).

You should store related with you businessID the sessionId and the
processId.


On Fri, Mar 26, 2010 at 2:21 AM, tolitius <webakaunt at gmail.com> wrote:

>
> Hi Kiran,
>
>   I usually don't post before doing "homework". Unfortunately Drools Flow
> documentation is too high-level in order to actually understand how it all
> comes together without looking at the source code...
>
>   WorkflowService {
>    ...
>         resumeFlow ( someBusinessId ) {
>
>                  // NO SESSION_ID given
>                  // NO PROCESS_INSTANCE_ID given
>                  // NO WORKITEM_ID given (or "ExecuteWorkItem" parameter
> for that matter)
>
>         }
>    ...
>   }
>
> Again:
>
>   1.  How these three relate to each other?
>
>        examples of the answers: [ session has many processes, process has
> many workitems ], [session is singleton for the knowledge base given, and
> has many processes, which have many workitems], etc..
>
>   2. How do I find these IDs in the sample method above?
>
>   3. I understand "workitemId" can resume the flow, but do I need session
> and process IDs to get to that work item?
>
>   4. Given that multiple workitems may be completed, how do I know, having
> SESSION_ID and PROCESS_ID (which I hopefully can get from the question "2")
> which workitem to mark as complete?
>
> Thank you,
> /Anatoly
>
>
> --
> View this message in context:
> http://n3.nabble.com/Resuming-the-Flow-SESSION-ID-PROCESS-INSTANCE-ID-WORKITEM-ID-tp607507p629805.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
>



-- 
- 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/599e60dc/attachment.html 


More information about the rules-users mailing list