[jboss-user] [jBPM] - Subprocess transition in a fork is not working
Felix Jose
do-not-reply at jboss.com
Thu Jun 3 13:36:09 EDT 2010
Felix Jose [http://community.jboss.org/people/FelixKJose] created the discussion
"Subprocess transition in a fork is not working"
To view the discussion, visit: http://community.jboss.org/message/546097#546097
--------------------------------------------------------------
Hi All,
I am having a main JBPM process(helloworld.jpdl.xml) and in that having a fork of that one transition to a sub process and the other to a state node. And these to should transition to a join join1 node. When I started the process it sucessfully reaching the fork and both two transitions are reached. But As the subprocess contains a state node "*printHelloWorld*" the execution will wait in that. And meanwhile as the other transition node in the fork is a state node (*Being1*) it also wait in that node.
*snippet of Main process(helloworld.jpdl.xml)*
<fork g="101,278,80,40" name="printHelloWorld">
<transition g="56,193:-39,-18" name="Being1" to="Being1"/>
<transition g="137,177:24,8" name="review" to="review"/>
</fork>
<join g="855,204,80,40" name="join1">
<transition to="printHelloWorld2"/>
</join>
<state name="Being1" g="0,0,80,40">
<transition to="join1" g="877,666:"/>-*-------Other execution is active at this node. Waiting for an external signal*
</state>
<sub-process name="review" sub-process-key="SubProc" g="0,0,80,40">
<transition to="join1" g="877,666:"/>
</sub-process>
*subporcess (SubPoc.jpdl.xml)*
<process name="SubProc" xmlns=" http://jbpm.org/4.3/jpdl http://jbpm.org/4.3/jpdl">
<start g="372,19,80,40">
<transition to="printHelloWorld"/>
</start>
<state name="printHelloWorld" g="0,0,80,40">------*Subprocess execution is waiting in This node. Waiting for an external signal.*
<transition name="printHelloWorld1" to="printHelloWorld1" g="877,666:"/>
</state>
<java g="539,206,138,40" method="printHelloWorld" name="printHelloWorld1">
<transition g="606,516:-39,-18" name="theEnd" to="theEnd"/>
</java>
<end g="369,491,80,40" name="theEnd"/>
</process>
I have used *processInstance.getExecutions()* which gives the active executions and the result is:
*[execution[helloWorld.13.Being1], execution[helloWorld.13.review]]*
Then by using *openExecutio.getSubProcessInstance().getId();* I find out the subprocess instance id and is *[SubProc.21].*
Then I signaled the subprocess using *executionService.signalExecutionById(id,"printHelloWorld1");* And it sucessfully transitioned and it prints :
*<---------------->*
* HELLO FELIX!*
*<---------------->*
So the subprocess sucessfully *completed*. But when I check activeactivity name in the subprcess it still shows *printHelloWorld state node (*by using *openExecutio.getSubProcessInstance().findActiveActivityNames()---o/p is --[printHelloWorld])*
And also when I checked active executions using *processInstance.getExecutions() it still gives:*
*[execution[helloWorld.13.Being1], execution[helloWorld.13.review]]* that means both two forked transitions are in *wait* state.
So my doubt is how can I transition the subprocess fron one state to another instead of using *executionService.signalExecutionById(id,"printHelloWorld1");?*
I have attached the sample application with this. Can you please give a solution as soon as possible?
*Thank You and Regards,*
*Felix K Jose*
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/546097#546097]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100603/d491c43c/attachment.html
More information about the jboss-user
mailing list