Hi,
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

2) yes it is accuarate. You always need a session, because the ProcessInstances lives inside a session.

On Fri, Mar 26, 2010 at 1:11 PM, tolitius <webakaunt@gmail.com> wrote:

Salaboy,

   Thank you. Makes it clear"er" :)

   1. So I get the list of current Nodes [btw, does it include all the
nodes for the sub-processes(sub-flows) as well?], but how do I know which
one I should complete?

       Here is a use case:

                  Approval Manager approves a Document, so there is some
kind of a business service that gets called:

                      documentApprovalService.approveDocument( approver,
document )

                  since this is a business service, it has no clue about
Drools Flow (and it should not), but it does have a documentId, which can be
used by the WorkflowService [which wraps Drools Flow, to ensure that the
calling code does not depend on a particular workflow engine, which
effectively decouples business layer from extra Drools Flow configuration,
etc.. ].

                  Now let's say the flow has several AppoveMe nodes, and
that was just one of them which has been approved.

                  The service will call WorkflowService.resumeFlow(
documentId ). DocumentId has relationship to SESSION_ID, and
PROCESS_INSTANCE_ID.

QUESTION: inside the "resumeFlow", how do I know _which_ one of those
ApproveMe workitems to mark complete?

   2. Would that be accurate to say that new session needs to be created to
"startProcess( flowId, params )"? [assumption is taken from what I see
happening in DB]

Thank you,
/Anatoly
--
View this message in context: http://n3.nabble.com/Resuming-the-Flow-SESSION-ID-PROCESS-INSTANCE-ID-WORKITEM-ID-tp607507p676961.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 -