Hi, <br>1) if you have subprocesses and you ask for your node instances in the Parent Process you will get a Node of type SubProcessNode, you will not get all the work items related inside it. You need to use the sub process id and then get all the node instances inside it to see which work items needs to be completed<br>
<br>2) yes it is accuarate. You always need a session, because the ProcessInstances lives inside a session.<br><br><div class="gmail_quote">On Fri, Mar 26, 2010 at 1:11 PM, 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>
Salaboy,<br>
<br>
    Thank you. Makes it clear&quot;er&quot; :)<br>
<br>
    1. So I get the list of current Nodes [btw, does it include all the<br>
nodes for the sub-processes(sub-flows) as well?], but how do I know which<br>
one I should complete?<br>
<br>
        Here is a use case:<br>
<br>
                   Approval Manager approves a Document, so there is some<br>
kind of a business service that gets called:<br>
<br>
                       documentApprovalService.approveDocument( approver,<br>
document )<br>
<br>
                   since this is a business service, it has no clue about<br>
Drools Flow (and it should not), but it does have a documentId, which can be<br>
used by the WorkflowService [which wraps Drools Flow, to ensure that the<br>
calling code does not depend on a particular workflow engine, which<br>
effectively decouples business layer from extra Drools Flow configuration,<br>
etc.. ].<br>
<br>
                   Now let&#39;s say the flow has several AppoveMe nodes, and<br>
that was just one of them which has been approved.<br>
<br>
                   The service will call WorkflowService.resumeFlow(<br>
documentId ). DocumentId has relationship to SESSION_ID, and<br>
PROCESS_INSTANCE_ID.<br>
<br>
QUESTION: inside the &quot;resumeFlow&quot;, how do I know _which_ one of those<br>
ApproveMe workitems to mark complete?<br>
<br>
    2. Would that be accurate to say that new session needs to be created to<br>
&quot;startProcess( flowId, params )&quot;? [assumption is taken from what I see<br>
happening in DB]<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-tp607507p676961.html" target="_blank">http://n3.nabble.com/Resuming-the-Flow-SESSION-ID-PROCESS-INSTANCE-ID-WORKITEM-ID-tp607507p676961.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>