1) calling ((WorkItemNode)<div class="im">processInstance.getNodeInstances() will return the list of current Node Instances inside the process.<br>This means that you can retrieve for each of them the name and compare to know which one do you want to complete.<br>
 <br></div>2) A session can contain multiple process instances inside it. it depends on the information that you want to store inside each session. Depending on your use case is how you will divide: one process Instance per session, multiple process instances per session, etc.<br>
<br><br><br><div class="gmail_quote">On Fri, Mar 26, 2010 at 9:34 AM, tolitius <span dir="ltr">&lt;<a href="mailto:webakaunt@gmail.com">webakaunt@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
Hi Salaboy,<br>
<br>
    I see, this is helpful. So let&#39;s say I have a relationship between my<br>
&quot;someBusinessId&quot; and session / process IDs:<br>
<br>
  WorkflowService {<br>
   ...<br>
        resumeFlow ( someBusinessId ) {<br>
<br>
                 workflowDao.findWorkflowInstanceBySomeBusinessId(); //<br>
where WorkflowInstance is a bean with two properties: SESSION_ID and<br>
PROCESS_INSTANCE_ID<br>
<br>
                 // somehow getting the right WORKITEM_ID     &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;<br>
        }<br>
   ...<br>
  }<br>
<br>
So I am able to find a SESSION_ID, and PROCESS_ID by my business key. And<br>
let&#39;s say my flow has many workitems:<br>
<br>
    1. By<br>
<div class="im">&quot;((WorkItemNode)processInstance.getNodeInstances().iterator().next()).getWorkItemId();&quot;<br>
</div>will I always get a workitem that is in a &quot;wait state&quot;? What if I have<br>
several of them in a &quot;wait state&quot; at the same time, how do I know which one<br>
to complete?<br>
<br>
    2. Just so I have a clear understanding of the Drools Flow processing<br>
model: &quot;What is a life cycle of SESSION_ID vs a life cycle of PROCESS_ID&quot;?<br>
<br>
Thank you,<br>
/Anatoly<br>
<font color="#888888">--<br>
View this message in context: <a href="http://n3.nabble.com/Resuming-the-Flow-SESSION-ID-PROCESS-INSTANCE-ID-WORKITEM-ID-tp607507p676515.html" target="_blank">http://n3.nabble.com/Resuming-the-Flow-SESSION-ID-PROCESS-INSTANCE-ID-WORKITEM-ID-tp607507p676515.html</a><br>

</font><div><div></div><div class="h5">Sent from the Drools - User mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br> - <a href="http://salaboy.wordpress.com">http://salaboy.wordpress.com</a><br> - <a href="http://www.jbug.com.ar">http://www.jbug.com.ar</a><br> - Salatino &quot;Salaboy&quot; Mauricio -<br>