Query regarding forking
ani Jan 18, 2006 3:33 AMHi,
Created a workflow definition having fork node..
Check the XML at the end of the message....
After creating the processInstance, I am calling signal in while loop.
while (!pi.hasEnded()) {
root.signal();
}
Following are the problems..
1. The ExitHandler for "stage2" and "stage3" doesn't get executed. Where as the EntryHandler get executed properly.
2. The "Stage2" get executed twice. Not getting why the "Stage2" get executed twice. Do I have to call "Signal" for fork child token in "while" loop?
Waiting for reply.
thanks
ani
===============================================================
Here is the XML..
"<process-definition name='workflow:DefaultWorkflowService_wkf_fork'>" + "<!-- START-STATE -->" + "<start-state name='start'>" + "<transition to='stage1'>" + "</transition>" + "<!-- NODES -->" + "<state name='stage1'>" + "<event type='node-enter'>" + "<action class='WorkflowEntryActionHandler'/>" + "</event>" + "<transition to='forkstage'/>" + "<event type='node-leave'>" + "<action class='WorkflowExitActionHandler'/>" + "</event>" + "</state>" + "<fork name='forkstage'>" + "<transition name ='first' to='stage2'/>" + "<transition name='second' to='stage3'/>" + "</fork>" + "<!-- NODES -->" + "<state name='stage2'>" + "<event type='node-enter'>" + "<action class='WorkflowEntryActionHandler'/>" + "</event>" + "<transition to='joinStage'/>" + "<event type='node-leave'>" + "<action class='WorkflowExitActionHandler'/>" + "</event>" + "</state>" + "<!-- NODES -->" + "<state name='stage3'>" + "<event type='node-enter'>" + "<action class='WorkflowEntryActionHandler'/>" + "</event>" + "<transition to='joinStage'/>" + "<event type='node-leave'>" + "<action class='WorkflowExitActionHandler'/>" + "</event>" + "</state>" + "<join name='joinStage'>" + "<action event-type='join-every-enter'>" + "<delegation class='JoinEnterAction'/>" + "</action>" + "<transition to='end'/>" + "</join>" + "<end-state name='end'>" + "</end-state>" + "</process-definition>"
===============================================================