5 Replies Latest reply on Jan 22, 2015 7:48 AM by He Wang

    Process stops after entering an intermediate catch message event/Multithreaded or single-threaded processes?

    He Wang Newbie

      Hi,

       

      I am new with jBPM. Recently I have been trying to realize the communication between different processes using intermediate catching/throwing message event.

      I created a jBPM project in Eclipse with jBPM plugin, drew two very simple processes(one throwing a message and one catching it) and started them in the engine using the default junit test. However, although the message throwing process seems to work fine, the message catching process apparently hauls after entering the intermediate catch message event, and didn't continue even after the message throwing process ended. I understand that each bpmn process is run in one technical thread, but are all the started processes also running in the main engine thread in serial?

       

      I also tried to start one message catching process and signal the process from the engine, but the message catching signal still cannot receive it.

       

      Can some one please help me out with it? Is there an alternative way of communicating between started processes?

       

      Thanks a lot!

       

      He Wang

       

      P.S.

       

      Here is the code I wrote:

       

      public class ProcessTest extends JbpmJUnitBaseTestCase {

       

       

        @Test

        public void testProcess() throws InterruptedException {

        Map<String,ResourceType> resources= new HashMap<String,ResourceType>();

        resources.put("message_throwing_process.bpmn", ResourceType.BPMN2);

        resources.put("message_catching_process.bpmn", ResourceType.BPMN2);

       

        RuntimeManager manager = createRuntimeManager(Strategy.SINGLETON,resources);

        RuntimeEngine engine = getRuntimeEngine(ProcessInstanceIdContext.get());

        KieSession ksession = engine.getKieSession();

        ksession.getWorkItemManager().registerWorkItemHandler("Manual Task",

        new HelloWorkItemHandler());

        ksession.getWorkItemManager().registerWorkItemHandler("Send Task",

        new SendTaskHandler());

        KieRuntimeLogger logger = KieServices.Factory.get().getLoggers().newFileLogger(ksession, "test");

        ProcessInstance processInstance2=ksession.startProcess("com.sample.bpmn.message_catching");

        System.out.println("Signalling the process");

        ksession.signalEvent("Message", "I send you a signal to triger the event");

       

        ProcessInstance processInstance = ksession.startProcess("com.sample.bpmn.message_throwing");

       

        assertProcessInstanceCompleted(processInstance2.getId(), ksession);//This one failed actually, saying that it expected null, but instead still have the instance in

       

        manager.disposeRuntimeEngine(engine);

        manager.close();

        logger.close();

        }

       

       

      }

        • 1. Re: Process stops after entering an intermediate catch message event/Multithreaded or single-threaded processes?
          He Wang Newbie

          Hi,

           

          I'm still stuck here with the signalling between processes. Can anyone help?

           

          Thanks a lot!

           

          He Wang

          • 2. Re: Process stops after entering an intermediate catch message event/Multithreaded or single-threaded processes?
            Maciej Swiderski Master

            could you attach your process definitions?

             

            If they are actually message events then for signalEvent method invocation you use prefix the actual name of the message defined in the process definition with Message-{actual name of the message in process}

             

            HTH

            1 of 1 people found this helpful
            • 3. Re: Process stops after entering an intermediate catch message event/Multithreaded or single-threaded processes?
              He Wang Newbie

              Hi Maciej,

               

              Thanks very much for your reply!

               

              I tried the signalEvent with the prefix+actual name and it works. That really saved my day. Thanks a lot!

               

              I have another question: how do I send signals between processes or between different branches within the same process? Does the throwing event have to send a message with the same eventID as the catching event? I tried several ways, but none seemed work.

               

              Thanks again!

               

              He Wang

               

              P.S.

               

              Here are the two processes:

               

               

              the thrower process:

               

              <?xml version="1.0" encoding="UTF-8"?>

              <bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:tns="http://www.jboss.org/drools" xmlns="http://www.jboss.org/drools" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd http://www.jboss.org/drools drools.xsd http://www.bpsim.org/schemas/1.0 bpsim.xsd" id="Definition" expressionLanguage="http://www.mvel.org/2.0" targetNamespace="http://www.jboss.org/drools" typeLanguage="http://www.java.com/javaTypes">

                <bpmn2:itemDefinition id="_String" structureRef="String"/>

                <bpmn2:itemDefinition id="_Integer" structureRef="Integer"/>

                <bpmn2:signal id="Signal_1" name="Signal"/>

                <bpmn2:message id="receivingMessage" itemRef="_String" name="receivingMessage"/>

                <bpmn2:process id="com.sample.bpmn.hello" tns:version="1" tns:packageName="defaultPackage" tns:adHoc="false" name="Thrower Process" isExecutable="true" processType="Private">

                  <bpmn2:extensionElements/>

                  <bpmn2:property id="textMessage" itemSubjectRef="_String"/>

                  <bpmn2:property id="receivedMessage" itemSubjectRef="_String"/>

                  <bpmn2:manualTask id="ManualTask_1" name="TestTask">

                    <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>

                    <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>

                    <bpmn2:ioSpecification id="InputOutputSpecification_5">

                      <bpmn2:dataOutput id="DataOutput_1" itemSubjectRef="_String" name="textMessage"/>

                      <bpmn2:inputSet id="InputSet_1" name="Input Set 1"/>

                      <bpmn2:outputSet id="_OutputSet_2" name="Output Set 2">

                        <bpmn2:dataOutputRefs>DataOutput_1</bpmn2:dataOutputRefs>

                      </bpmn2:outputSet>

                    </bpmn2:ioSpecification>

                    <bpmn2:dataOutputAssociation id="DataOutputAssociation_1">

                      <bpmn2:sourceRef>DataOutput_1</bpmn2:sourceRef>

                      <bpmn2:targetRef>textMessage</bpmn2:targetRef>

                    </bpmn2:dataOutputAssociation>

                  </bpmn2:manualTask>

                  <bpmn2:sequenceFlow id="SequenceFlow_1" tns:priority="1" name="" sourceRef="ManualTask_1" targetRef="_2"/>

                  <bpmn2:scriptTask id="_2" name="Hello" scriptFormat="http://www.java.com/java">

                    <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>

                    <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>

                    <bpmn2:script>kcontext.getKieRuntime().signalEvent(&quot;Message&quot;, &quot;Hey there&quot;, kcontext.getProcessInstance().getId());</bpmn2:script>

                  </bpmn2:scriptTask>

                  <bpmn2:endEvent id="EndEvent_4" name="">

                    <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>

                  </bpmn2:endEvent>

                  <bpmn2:startEvent id="StartEvent_2" name="">

                    <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>

                  </bpmn2:startEvent>

                  <bpmn2:sequenceFlow id="SequenceFlow_4" tns:priority="1" name="" sourceRef="StartEvent_2" targetRef="ManualTask_1"/>

                  <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_3" name="">

                    <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>

                    <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>

                    <bpmn2:dataInput id="DataInput_7" itemSubjectRef="_String" name="Message_3_Input"/>

                    <bpmn2:dataInputAssociation id="DataInputAssociation_5">

                      <bpmn2:sourceRef>textMessage</bpmn2:sourceRef>

                      <bpmn2:targetRef>DataInput_7</bpmn2:targetRef>

                    </bpmn2:dataInputAssociation>

                    <bpmn2:inputSet id="InputSet_4" name="Input Set 4">

                      <bpmn2:dataInputRefs>DataInput_7</bpmn2:dataInputRefs>

                    </bpmn2:inputSet>

                    <bpmn2:messageEventDefinition id="MessageEventDefinition_3" messageRef="receivingMessage"/>

                  </bpmn2:intermediateThrowEvent>

                  <bpmn2:sequenceFlow id="SequenceFlow_6" tns:priority="1" name="" sourceRef="_2" targetRef="IntermediateThrowEvent_3"/>

                  <bpmn2:sequenceFlow id="SequenceFlow_7" tns:priority="1" name="" sourceRef="IntermediateThrowEvent_3" targetRef="EndEvent_4"/>

                </bpmn2:process>

                <bpmndi:BPMNDiagram id="BPMNDiagram_1" name="Thrower Process">

                  <bpmndi:BPMNPlane id="BPMNPlane_Process_1" bpmnElement="com.sample.bpmn.hello">

                    <bpmndi:BPMNShape id="BPMNShape_ManualTask_1" bpmnElement="ManualTask_1">

                      <dc:Bounds height="50.0" width="110.0" x="170.0" y="23.0"/>

                    </bpmndi:BPMNShape>

                    <bpmndi:BPMNShape id="BPMNShape_ScriptTask_1" bpmnElement="_2">

                      <dc:Bounds height="48.0" width="80.0" x="370.0" y="24.0"/>

                    </bpmndi:BPMNShape>

                    <bpmndi:BPMNShape id="BPMNShape_StartEvent_3" bpmnElement="StartEvent_2">

                      <dc:Bounds height="36.0" width="36.0" x="30.0" y="31.0"/>

                    </bpmndi:BPMNShape>

                    <bpmndi:BPMNShape id="BPMNShape_EndEvent_3" bpmnElement="EndEvent_4">

                      <dc:Bounds height="36.0" width="36.0" x="600.0" y="30.0"/>

                    </bpmndi:BPMNShape>

                    <bpmndi:BPMNShape id="BPMNShape_IntermediateThrowEvent_3" bpmnElement="IntermediateThrowEvent_3">

                      <dc:Bounds height="36.0" width="36.0" x="512.0" y="32.0"/>

                    </bpmndi:BPMNShape>

                    <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_1" sourceElement="BPMNShape_ManualTask_1" targetElement="BPMNShape_ScriptTask_1">

                      <di:waypoint xsi:type="dc:Point" x="280.0" y="48.0"/>

                      <di:waypoint xsi:type="dc:Point" x="320.0" y="48.0"/>

                      <di:waypoint xsi:type="dc:Point" x="320.0" y="48.0"/>

                      <di:waypoint xsi:type="dc:Point" x="370.0" y="48.0"/>

                    </bpmndi:BPMNEdge>

                    <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_4" sourceElement="BPMNShape_StartEvent_3" targetElement="BPMNShape_ManualTask_1">

                      <di:waypoint xsi:type="dc:Point" x="66.0" y="49.0"/>

                      <di:waypoint xsi:type="dc:Point" x="162.0" y="49.0"/>

                      <di:waypoint xsi:type="dc:Point" x="162.0" y="48.0"/>

                      <di:waypoint xsi:type="dc:Point" x="170.0" y="48.0"/>

                    </bpmndi:BPMNEdge>

                    <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_6" sourceElement="BPMNShape_ScriptTask_1" targetElement="BPMNShape_IntermediateThrowEvent_3">

                      <di:waypoint xsi:type="dc:Point" x="450.0" y="48.0"/>

                      <di:waypoint xsi:type="dc:Point" x="477.0" y="48.0"/>

                      <di:waypoint xsi:type="dc:Point" x="477.0" y="50.0"/>

                      <di:waypoint xsi:type="dc:Point" x="512.0" y="50.0"/>

                    </bpmndi:BPMNEdge>

                    <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_7" sourceElement="BPMNShape_IntermediateThrowEvent_3" targetElement="BPMNShape_EndEvent_3">

                      <di:waypoint xsi:type="dc:Point" x="548.0" y="50.0"/>

                      <di:waypoint xsi:type="dc:Point" x="571.0" y="50.0"/>

                      <di:waypoint xsi:type="dc:Point" x="571.0" y="48.0"/>

                      <di:waypoint xsi:type="dc:Point" x="600.0" y="48.0"/>

                    </bpmndi:BPMNEdge>

                  </bpmndi:BPMNPlane>

                </bpmndi:BPMNDiagram>

              </bpmn2:definitions>

               

              and here is the receiver process:

               

              <?xml version="1.0" encoding="UTF-8"?>

              <bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:tns="http://www.jboss.org/drools" xmlns="http://www.jboss.org/drools" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd http://www.jboss.org/drools drools.xsd http://www.bpsim.org/schemas/1.0 bpsim.xsd" id="Definition" expressionLanguage="http://www.mvel.org/2.0" targetNamespace="http://www.jboss.org/drools" typeLanguage="http://www.java.com/javaTypes">

                <bpmn2:itemDefinition id="_String" structureRef="String"/>

                <bpmn2:message id="receivingMessage" itemRef="_String" name="receivingMessage"/>

                <bpmn2:process id="com.sample.bpmn.worker1" tns:version="1" tns:packageName="defaultPackage" tns:adHoc="false" name="Listener Process" isExecutable="true" processType="Private">

                  <bpmn2:property id="receivedMessage" itemSubjectRef="_String"/>

                  <bpmn2:property id="sentMessage" itemSubjectRef="_String"/>

                  <bpmn2:parallelGateway id="ParallelGateway_1" name="Diverging gateway at first" gatewayDirection="Diverging">

                    <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>

                    <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>

                    <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>

                  </bpmn2:parallelGateway>

                  <bpmn2:sequenceFlow id="SequenceFlow_2" tns:priority="1" name="" sourceRef="ParallelGateway_1" targetRef="ScriptTask_3"/>

                  <bpmn2:sequenceFlow id="SequenceFlow_4" tns:priority="1" name="" sourceRef="ParallelGateway_1" targetRef="ScriptTask_1"/>

                  <bpmn2:endEvent id="EndEvent_3" name="ending point">

                    <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>

                  </bpmn2:endEvent>

                  <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_1" name="Message receiver">

                    <bpmn2:documentation id="Documentation_15">This event should catch the message sent by the sender.</bpmn2:documentation>

                    <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>

                    <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>

                    <bpmn2:dataOutput id="DataOutput_1" itemSubjectRef="_String" name="Message_1_Output"/>

                    <bpmn2:dataOutputAssociation id="DataOutputAssociation_1">

                      <bpmn2:sourceRef>DataOutput_1</bpmn2:sourceRef>

                      <bpmn2:targetRef>receivedMessage</bpmn2:targetRef>

                    </bpmn2:dataOutputAssociation>

                    <bpmn2:outputSet id="OutputSet_1" name="Output Set 1">

                      <bpmn2:dataOutputRefs>DataOutput_1</bpmn2:dataOutputRefs>

                    </bpmn2:outputSet>

                    <bpmn2:messageEventDefinition id="MessageEventDefinition_1" messageRef="receivingMessage"/>

                  </bpmn2:intermediateCatchEvent>

                  <bpmn2:sequenceFlow id="SequenceFlow_5" tns:priority="1" name="" sourceRef="IntermediateCatchEvent_1" targetRef="ScriptTask_2"/>

                  <bpmn2:scriptTask id="ScriptTask_1" name="Welcome to the North -- second branch" scriptFormat="http://www.java.com/java">

                    <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>

                    <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>

                    <bpmn2:script>System.out.println(&quot;Waiting for the message&quot;);&#xD;

              &#xD;

              </bpmn2:script>

                  </bpmn2:scriptTask>

                  <bpmn2:sequenceFlow id="SequenceFlow_3" tns:priority="1" name="" sourceRef="ScriptTask_1" targetRef="IntermediateCatchEvent_1"/>

                  <bpmn2:startEvent id="StartEvent_1" name="starting point">

                    <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>

                  </bpmn2:startEvent>

                  <bpmn2:sequenceFlow id="SequenceFlow_7" tns:priority="1" name="" sourceRef="StartEvent_1" targetRef="ParallelGateway_1"/>

                  <bpmn2:scriptTask id="ScriptTask_3" name="Welcome to the South - first branch" scriptFormat="http://www.java.com/java">

                    <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>

                    <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>

                    <bpmn2:script>System.out.println(&quot;Sending the message&quot;);&#xD;

              kcontext.setVariable(&quot;sentMessage&quot;, &quot;I'm trying to deliver a message.&quot;);</bpmn2:script>

                  </bpmn2:scriptTask>

                  <bpmn2:sequenceFlow id="SequenceFlow_8" tns:priority="1" name="" sourceRef="ScriptTask_3" targetRef="IntermediateThrowEvent_1"/>

                  <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1" name="Message sender">

                    <bpmn2:documentation id="Documentation_12">This event will publish a message</bpmn2:documentation>

                    <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>

                    <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>

                    <bpmn2:dataInput id="DataInput_3" itemSubjectRef="_String" name="Message_3_Input"/>

                    <bpmn2:dataInputAssociation id="DataInputAssociation_2">

                      <bpmn2:sourceRef>sentMessage</bpmn2:sourceRef>

                      <bpmn2:targetRef>DataInput_3</bpmn2:targetRef>

                    </bpmn2:dataInputAssociation>

                    <bpmn2:inputSet id="InputSet_1" name="Input Set 1">

                      <bpmn2:dataInputRefs>DataInput_3</bpmn2:dataInputRefs>

                    </bpmn2:inputSet>

                    <bpmn2:messageEventDefinition id="MessageEventDefinition_3" messageRef="receivingMessage"/>

                  </bpmn2:intermediateThrowEvent>

                  <bpmn2:parallelGateway id="ParallelGateway_2" name="converging gateway at last" gatewayDirection="Converging">

                    <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>

                    <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>

                    <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>

                  </bpmn2:parallelGateway>

                  <bpmn2:sequenceFlow id="SequenceFlow_1" tns:priority="1" name="" sourceRef="IntermediateThrowEvent_1" targetRef="ParallelGateway_2"/>

                  <bpmn2:scriptTask id="ScriptTask_2" name="Display Message">

                    <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>

                    <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>

                    <bpmn2:script>System.out.println(&quot;Worker's got da messaage: &quot;+receivedMessage);</bpmn2:script>

                  </bpmn2:scriptTask>

                  <bpmn2:sequenceFlow id="SequenceFlow_6" tns:priority="1" name="" sourceRef="ScriptTask_2" targetRef="ParallelGateway_2"/>

                  <bpmn2:sequenceFlow id="SequenceFlow_9" tns:priority="1" name="" sourceRef="ParallelGateway_2" targetRef="EndEvent_3"/>

                </bpmn2:process>

                <bpmndi:BPMNDiagram id="BPMNDiagram_1" name="Listener Process">

                  <bpmndi:BPMNPlane id="BPMNPlane_Process_1" bpmnElement="com.sample.bpmn.worker1">

                    <bpmndi:BPMNShape id="BPMNShape_IntermediateCatchEvent_1" bpmnElement="IntermediateCatchEvent_1">

                      <dc:Bounds height="36.0" width="36.0" x="470.0" y="219.0"/>

                    </bpmndi:BPMNShape>

                    <bpmndi:BPMNShape id="BPMNShape_EndEvent_3" bpmnElement="EndEvent_3">

                      <dc:Bounds height="36.0" width="36.0" x="792.0" y="43.0"/>

                    </bpmndi:BPMNShape>

                    <bpmndi:BPMNShape id="BPMNShape_ParallelGateway_1" bpmnElement="ParallelGateway_1">

                      <dc:Bounds height="50.0" width="50.0" x="195.0" y="116.0"/>

                    </bpmndi:BPMNShape>

                    <bpmndi:BPMNShape id="BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">

                      <dc:Bounds height="36.0" width="36.0" x="60.0" y="123.0"/>

                    </bpmndi:BPMNShape>

                    <bpmndi:BPMNShape id="BPMNShape_ScriptTask_1" bpmnElement="ScriptTask_1">

                      <dc:Bounds height="50.0" width="110.0" x="300.0" y="212.0"/>

                    </bpmndi:BPMNShape>

                    <bpmndi:BPMNShape id="BPMNShape_ScriptTask_3" bpmnElement="ScriptTask_3">

                      <dc:Bounds height="50.0" width="110.0" x="300.0" y="40.0"/>

                    </bpmndi:BPMNShape>

                    <bpmndi:BPMNShape id="BPMNShape_IntermediateThrowEvent_1" bpmnElement="IntermediateThrowEvent_1">

                      <dc:Bounds height="36.0" width="36.0" x="470.0" y="47.0"/>

                    </bpmndi:BPMNShape>

                    <bpmndi:BPMNShape id="BPMNShape_ParallelGateway_2" bpmnElement="ParallelGateway_2">

                      <dc:Bounds height="50.0" width="50.0" x="685.0" y="95.0"/>

                    </bpmndi:BPMNShape>

                    <bpmndi:BPMNShape id="BPMNShape_ScriptTask_2" bpmnElement="ScriptTask_2">

                      <dc:Bounds height="50.0" width="110.0" x="598.0" y="213.0"/>

                    </bpmndi:BPMNShape>

                    <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="BPMNShape_ScriptTask_1" targetElement="BPMNShape_IntermediateCatchEvent_1">

                      <di:waypoint xsi:type="dc:Point" x="410.0" y="237.0"/>

                      <di:waypoint xsi:type="dc:Point" x="437.0" y="237.0"/>

                      <di:waypoint xsi:type="dc:Point" x="437.0" y="237.0"/>

                      <di:waypoint xsi:type="dc:Point" x="470.0" y="237.0"/>

                    </bpmndi:BPMNEdge>

                    <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="BPMNShape_IntermediateCatchEvent_1" targetElement="BPMNShape_ScriptTask_2">

                      <di:waypoint xsi:type="dc:Point" x="506.0" y="237.0"/>

                      <di:waypoint xsi:type="dc:Point" x="547.0" y="237.0"/>

                      <di:waypoint xsi:type="dc:Point" x="547.0" y="238.0"/>

                      <di:waypoint xsi:type="dc:Point" x="598.0" y="238.0"/>

                    </bpmndi:BPMNEdge>

                    <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="BPMNShape_ParallelGateway_1" targetElement="BPMNShape_ScriptTask_3">

                      <di:waypoint xsi:type="dc:Point" x="220.0" y="116.0"/>

                      <di:waypoint xsi:type="dc:Point" x="220.0" y="65.0"/>

                      <di:waypoint xsi:type="dc:Point" x="300.0" y="65.0"/>

                    </bpmndi:BPMNEdge>

                    <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="BPMNShape_ParallelGateway_1" targetElement="BPMNShape_ScriptTask_1">

                      <di:waypoint xsi:type="dc:Point" x="220.0" y="167.0"/>

                      <di:waypoint xsi:type="dc:Point" x="220.0" y="237.0"/>

                      <di:waypoint xsi:type="dc:Point" x="300.0" y="237.0"/>

                    </bpmndi:BPMNEdge>

                    <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_7" sourceElement="BPMNShape_StartEvent_2" targetElement="BPMNShape_ParallelGateway_1">

                      <di:waypoint xsi:type="dc:Point" x="96.0" y="141.0"/>

                      <di:waypoint xsi:type="dc:Point" x="140.0" y="141.0"/>

                      <di:waypoint xsi:type="dc:Point" x="140.0" y="141.0"/>

                      <di:waypoint xsi:type="dc:Point" x="195.0" y="141.0"/>

                    </bpmndi:BPMNEdge>

                    <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_8" sourceElement="BPMNShape_ScriptTask_3" targetElement="BPMNShape_IntermediateThrowEvent_1">

                      <di:waypoint xsi:type="dc:Point" x="410.0" y="65.0"/>

                      <di:waypoint xsi:type="dc:Point" x="437.0" y="65.0"/>

                      <di:waypoint xsi:type="dc:Point" x="437.0" y="65.0"/>

                      <di:waypoint xsi:type="dc:Point" x="470.0" y="65.0"/>

                    </bpmndi:BPMNEdge>

                    <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="BPMNShape_IntermediateThrowEvent_1" targetElement="BPMNShape_ParallelGateway_2">

                      <di:waypoint xsi:type="dc:Point" x="488.0" y="83.0"/>

                      <di:waypoint xsi:type="dc:Point" x="488.0" y="120.0"/>

                      <di:waypoint xsi:type="dc:Point" x="685.0" y="120.0"/>

                    </bpmndi:BPMNEdge>

                    <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="BPMNShape_ScriptTask_2" targetElement="BPMNShape_ParallelGateway_2">

                      <di:waypoint xsi:type="dc:Point" x="653.0" y="213.0"/>

                      <di:waypoint xsi:type="dc:Point" x="653.0" y="120.0"/>

                      <di:waypoint xsi:type="dc:Point" x="685.0" y="120.0"/>

                    </bpmndi:BPMNEdge>

                    <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_9" sourceElement="BPMNShape_ParallelGateway_2" targetElement="BPMNShape_EndEvent_3">

                      <di:waypoint xsi:type="dc:Point" x="736.0" y="120.0"/>

                      <di:waypoint xsi:type="dc:Point" x="810.0" y="120.0"/>

                      <di:waypoint xsi:type="dc:Point" x="810.0" y="79.0"/>

                    </bpmndi:BPMNEdge>

                  </bpmndi:BPMNPlane>

                </bpmndi:BPMNDiagram>

              </bpmn2:definitions>

               

              Sorry that I couldn't fine a better way to attach them, since I didn't see an option of attaching a file.

               

              Thanks again!

               

              He Wang

              • 4. Re: Process stops after entering an intermediate catch message event/Multithreaded or single-threaded processes?
                Maciej Swiderski Master

                for this use case I'd go for signal events rather message events. So try to replace them with signalEventDefinition and that should work just fine

                 

                HTH

                • 5. Re: Process stops after entering an intermediate catch message event/Multithreaded or single-threaded processes?
                  He Wang Newbie

                  Hi Maciej,

                   

                  Thanks a lot for the reply!

                   

                  I changed the event type and it finally worked!

                   

                  The only concern I would like to point out is that it seems we cannot change the event ID of one signal instance after creating them in the bpmn editor. They are automatically named like Signal_1, Signal_2 and so on. We can only change the name of it. The current workaround is to change it in the the source using xml editor. The correct format that worked for me is like Message-eventID,  where the event ID is the same as the one the message catching event in the other process is expecting(not the name of the message, but the event ID).

                   

                  Anyway, thanks a lot for helping me out!

                   

                  He Wang

                  1 of 1 people found this helpful