[jboss-user] [jBPM] - JBPM 5: Workflow not leaving embedded sub process

Robert de Lorimier do-not-reply at jboss.com
Wed Dec 19 17:33:19 EST 2012

Robert de Lorimier [https://community.jboss.org/people/r_delorimier] created the discussion

"JBPM 5: Workflow not leaving embedded sub process"

To view the discussion, visit: https://community.jboss.org/message/784168#784168

Hi all,

I am trying to create a workflow with human tasks, convergent and divergent gateways, and an embedded subprocess. For some reason it looks like the workflow does not continue after the subprocess finishes to go to the final end point. See the workflow image:

 https://community.jboss.org/servlet/JiveServlet/showImage/2-784168-20014/workflow.png  https://community.jboss.org/servlet/JiveServlet/downloadImage/2-784168-20014/450-352/workflow.png 
I am using a variable in the constraints of the divergent gateway to decide which direction the workflow will go. After I select the "Appove Rule" node, the next nodes are a convergent and divergent gateway. I can see that it is making it to the the divergent gateway, as I added in some code the the constraint that goes to the termination node in the subprocess:

org.drools.runtime.process.WorkflowProcessInstance process = (org.drools.runtime.process.WorkflowProcessInstance)kcontext.getProcessInstance();

if (((String)process.getVariable("ruleState")).equals("LIVE"))
    System.out.println("Rule approved and going LIVE");
    return true;
    return false;

I can see the Text "Rule approved and going LIVE" in the console when running my code, so it should be going to the terninal node. Outside of the subprocess is another convergent and divergent node. The divergent node uses the ruleState variable to decide whether go back through the process again or go to the terminal node, and again to am printing out what the decision is. I do not see any of this text when I run the code. I also assert that the End node was triggered and the process instance is completed, and both of these fail. I am including the workflow and code as a maven project so you can run the test with "mvn install" and take a look at it yourself.

Reply to this message by going to Community

Start a new discussion in jBPM at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20121219/97358924/attachment.html 

More information about the jboss-user mailing list