1) calling ((WorkItemNode)
processInstance.getNodeInstances() will return the list of current Node Instances inside the process.
This means that you can retrieve for each of them the name and compare to know which one do you want to complete.
 
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.



On Fri, Mar 26, 2010 at 9:34 AM, tolitius <webakaunt@gmail.com> wrote:

Hi Salaboy,

   I see, this is helpful. So let's say I have a relationship between my
"someBusinessId" and session / process IDs:

 WorkflowService {
  ...
       resumeFlow ( someBusinessId ) {

                workflowDao.findWorkflowInstanceBySomeBusinessId(); //
where WorkflowInstance is a bean with two properties: SESSION_ID and
PROCESS_INSTANCE_ID

                // somehow getting the right WORKITEM_ID     <<<<<<<<
       }
  ...
 }

So I am able to find a SESSION_ID, and PROCESS_ID by my business key. And
let's say my flow has many workitems:

   1. By
"((WorkItemNode)processInstance.getNodeInstances().iterator().next()).getWorkItemId();"
will I always get a workitem that is in a "wait state"? What if I have
several of them in a "wait state" at the same time, how do I know which one
to complete?

   2. Just so I have a clear understanding of the Drools Flow processing
model: "What is a life cycle of SESSION_ID vs a life cycle of PROCESS_ID"?

Thank you,
/Anatoly
--
View this message in context: http://n3.nabble.com/Resuming-the-Flow-SESSION-ID-PROCESS-INSTANCE-ID-WORKITEM-ID-tp607507p676515.html
Sent from the Drools - User mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users



--
- http://salaboy.wordpress.com
- http://www.jbug.com.ar
- Salatino "Salaboy" Mauricio -