[jboss-user] [jBPM] - JBPM 4.3 - signalled state remains active - bug or incorrect usage?

Jan Nad do-not-reply at jboss.com
Tue May 4 11:23:44 EDT 2010


Jan Nad [http://community.jboss.org/people/jnad] created the discussion

"JBPM 4.3 - signalled state remains active - bug or incorrect usage?"

To view the discussion, visit: http://community.jboss.org/message/541111#541111

--------------------------------------------------------------
The same problem seems to be described here  http://www.techienuggets.com/Comments?tx=100474 http://www.techienuggets.com/Comments?tx=100474. I've not found any other references to it (or solutions).

I have the following process definition:
 http://community.jboss.org/servlet/JiveServlet/showImage/2675/TestProcess.png  http://community.jboss.org/servlet/JiveServlet/downloadImage/2675/450-283/TestProcess.png When I signal execution in D1, D2 becomes active (as reported by findActiveActivityNames), the problem is that D1 remains active as well. Is this a bug or did I get somethig wrong? It's been suggested this might be caused by wrong fork-join nesting but this doesn't help in my case.

<process name="TestProcess" xmlns="http://jbpm.org/4.3/jpdl">
   <start name="start1">
      <transition to="fork1"/>
   </start>
   <state name="A">
      <transition to="fork2"/>
   </state>
   <state name="C1">
      <transition to="C2"/>
   </state>
   <state name="C2">
      <transition to="join2"/>
   </state>
   <state name="D1">
      <transition to="D2"/>
   </state>
   <state name="D2">
      <transition to="join2"/>
   </state>
   <fork name="fork2">
      <transition to="D1"/>
      <transition to="C1"/>
   </fork>
   <end name="finihed"/>
   <fork name="fork1">
      <transition to="A"/>
      <transition to="B"/>
   </fork>
   <state name="B">
      <transition to="join1"/>
   </state>
   <join name="join2"">
      <transition to="join1"/>
   </join>
   <join name="join1">
      <transition to="E"/>
   </join>
   <state name="E">
      <transition to="end"/>
   </state>
   <end name="end"/>
</process>


public void test() {
        repositoryService.createDeployment()
         .addResourceFromClasspath("pmlprocesses/TestProcess.jpdl.xml")
         .deploy();
        
   *     ProcessInstance processInstance = executionService.startProcessInstanceByKey("TestProcess");
        String pid = processInstance.getId();*
        System.out.println(processInstance.findActiveActivityNames().toString());*
        String executionId = processInstance.findActiveExecutionIn("B").getId();
        processInstance = executionService.signalExecutionById(executionId);*
        System.out.println(processInstance.findActiveActivityNames().toString());
 *       executionId = processInstance.findActiveExecutionIn("A").getId();
        processInstance = executionService.signalExecutionById(executionId);*
        System.out.println(processInstance.findActiveActivityNames().toString());*
        executionId = processInstance.findActiveExecutionIn("C1").getId();
        processInstance = executionService.signalExecutionById(executionId);*
        System.out.println(processInstance.findActiveActivityNames().toString());
      *  executionId = processInstance.findActiveExecutionIn("C2").getId();
        processInstance = executionService.signalExecutionById(executionId);*
        System.out.println(processInstance.findActiveActivityNames().toString());
      *  executionId = processInstance.findActiveExecutionIn("D1").getId();
        processInstance = executionService.signalExecutionById(executionId);*
        System.out.println(processInstance.findActiveActivityNames().toString());
      *  executionId = processInstance.findActiveExecutionIn("D2").getId();
        processInstance = executionService.signalExecutionById(executionId);*
        System.out.println(processInstance.findActiveActivityNames().toString());*
        executionId = processInstance.findActiveExecutionIn("E").getId();
        processInstance = executionService.signalExecutionById(executionId);*

    *    assertNull("execution "+pid+" should not exist", executionService.findExecutionById(pid));* 
}

Output:
*[A, B]
[A]
[C1, D1]
[C2, D1]
[D1]
[D2, D1]
[E, D1]*

The process seems to have finished execution.

Thanks for any ideas.

--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/541111#541111]

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/20100504/fe402241/attachment.html 


More information about the jboss-user mailing list