0 Replies Latest reply on Dec 28, 2010 1:39 AM by Vincent He

    Why "TerminateEndEvent" terminator process does not work, is it jBPMN4.4 the Bug it?

    Vincent He Newbie

      subProcessTest.png

       

       

      <process id="subProcessTest1" name="subProcessTest1">
      <startEvent id="Start_1" name="Start" />
      <userTask id="Task3" name="Task3"/>
      <endEvent id="End_1" name="End_1" />
      <subProcess id="SubProcessA" name="SubProcessA">
      <startEvent id="Start_2" name="Start" />
      <userTask id="Task1" name="Task1"/>
      <userTask id="Task2" name="Task2"/>
      <parallelGateway id="Gateway_1" name="Gateway" />
      <endEvent id="End_2" name="End_2" />
      <endEvent id="End_3" name="End_3">
      <terminateEventDefinition id="ted1"/>
      </endEvent>
      <sequenceFlow id="SequenceFlow_3" sourceRef="Start_2"
      targetRef="Gateway_1" />
      <sequenceFlow id="SequenceFlow_4" sourceRef="Gateway_1"
      targetRef="Task1" />
      <sequenceFlow id="SequenceFlow_5" sourceRef="Gateway_1"
      targetRef="Task2" />
      <sequenceFlow id="SequenceFlow_6" sourceRef="Task1"
      targetRef="End_2" />
      <sequenceFlow id="SequenceFlow_7" sourceRef="Task2"
      targetRef="End_3" />
      </subProcess>
      <sequenceFlow id="SequenceFlow_1" sourceRef="Start_1"
      targetRef="SubProcessA" />
      <sequenceFlow id="SequenceFlow_8" sourceRef="SubProcessA"
      targetRef="Task3" />
      <sequenceFlow id="SequenceFlow_2" sourceRef="Task3"
      targetRef="End_1" />
      </process>

       

           <process id="subProcessTest1" name="subProcessTest1">
                <startEvent id="Start_1" name="Start" />
                <userTask id="Task3" name="Task3"/>
                <endEvent id="End_1" name="End_1" />
                <subProcess id="SubProcessA" name="SubProcessA">
                     <startEvent id="Start_2" name="Start" />
                     <userTask id="Task1" name="Task1"/>
                     <userTask id="Task2" name="Task2"/>
                     <parallelGateway id="Gateway_1" name="Gateway" />
                     <endEvent id="End_2" name="End_2" />
                     <endEvent id="End_3" name="End_3">
                          <terminateEventDefinition id="ted1"/>
                     </endEvent>
                     <sequenceFlow id="SequenceFlow_3" sourceRef="Start_2"
                          targetRef="Gateway_1" />
                     <sequenceFlow id="SequenceFlow_4" sourceRef="Gateway_1"
                          targetRef="Task1" />
                     <sequenceFlow id="SequenceFlow_5" sourceRef="Gateway_1"
                          targetRef="Task2" />
                     <sequenceFlow id="SequenceFlow_6" sourceRef="Task1"
                          targetRef="End_2" />
                     <sequenceFlow id="SequenceFlow_7" sourceRef="Task2"
                          targetRef="End_3" />
                </subProcess>
                <sequenceFlow id="SequenceFlow_1" sourceRef="Start_1"
                     targetRef="SubProcessA" />
                <sequenceFlow id="SequenceFlow_8" sourceRef="SubProcessA"
                     targetRef="Task3" />
                <sequenceFlow id="SequenceFlow_2" sourceRef="Task3"
                     targetRef="End_1" />
           </process>
      

       

           ProcessInstance processInstance = executionService.startProcessInstanceByKey("subProcessTest1");
           Task task1 = taskService.createTaskQuery().activityName("Task1").uniqueResult();
           assertNotNull(task1);
           Task task2 = taskService.createTaskQuery().activityName("Task2").uniqueResult();
           assertNotNull(task2);
      
           taskService.completeTask(task2.getId());
           List<Task> list = taskService.createTaskQuery().processInstanceId(processInstance.getId()).list();
           Task reviewTask1 = taskService.createTaskQuery().activityName("Task1").uniqueResult();
           assertNull(reviewTask1);//  <----Here, do not pass! Why???
      

       

       

      I used version is jBPM4.4, hope for help...