Hi,The document says: <blockcode>An Event Sub-Process may be interrupting or non-interrupting. … The fact whether the subprocess is interrupting is configured using the start event triggering the Event Sub-Process.</blockcode>But there is no place in Activiti Designer to config a start event in event sub-process non-interrupting.So I edit the xml file and add parallelMultiple="true" isInterrupting="false" attribute on startEvent element.But the event sub-process is still interrupting.Is there any solution or workaround?below is code:
@Test
@Deployment(resources = "me/chanjar/eventsubprocess/event-subprocess.bpmn")
public void messageStartEvent() {
String processDefinitionKey = "event-subprocess";
runtimeService.startProcessInstanceByKey(processDefinitionKey);
sendMessage(processDefinitionKey);
Task task3 = taskService.createTaskQuery().processDefinitionKey(processDefinitionKey).taskDefinitionKey("usertask3").singleResult();
taskService.complete(task3.getId());
// task1 is null
Task task1 = taskService.createTaskQuery().processDefinitionKey(processDefinitionKey).taskDefinitionKey("usertask1").singleResult();
}
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
<message id="abc" name="abc"></message>
<process id="event-subprocess" name="event-subprocess" isExecutable="true">
<startEvent id="startevent1" name="Start"></startEvent>
<userTask id="usertask1" name="usertask1"></userTask>
<sequenceFlow id="flow1" sourceRef="startevent1" targetRef="usertask1"></sequenceFlow>
<userTask id="usertask2" name="usertask2"></userTask>
<sequenceFlow id="flow2" sourceRef="usertask1" targetRef="usertask2"></sequenceFlow>
<endEvent id="endevent1" name="End"></endEvent>
<sequenceFlow id="flow3" sourceRef="usertask2" targetRef="endevent1"></sequenceFlow>
<subProcess id="eventsubprocess1" name="Event sub Process" triggeredByEvent="true">
<startEvent id="messagestartevent1" name="Message start" parallelMultiple="true" isInterrupting="false">
<messageEventDefinition messageRef="abc"></messageEventDefinition>
</startEvent>
<userTask id="usertask3" name="usertask3"></userTask>
<sequenceFlow id="flow4" sourceRef="messagestartevent1" targetRef="usertask3"></sequenceFlow>
</subProcess>
</process>
<bpmndi:BPMNDiagram id="BPMNDiagram_event-subprocess">
<bpmndi:BPMNPlane bpmnElement="event-subprocess" id="BPMNPlane_event-subprocess">
<bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
<omgdc:Bounds height="35.0" width="35.0" x="40.0" y="100.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1">
<omgdc:Bounds height="55.0" width="105.0" x="120.0" y="90.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="usertask2" id="BPMNShape_usertask2">
<omgdc:Bounds height="55.0" width="105.0" x="270.0" y="90.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
<omgdc:Bounds height="35.0" width="35.0" x="420.0" y="100.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="eventsubprocess1" id="BPMNShape_eventsubprocess1">
<omgdc:Bounds height="171.0" width="351.0" x="60.0" y="190.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="messagestartevent1" id="BPMNShape_messagestartevent1">
<omgdc:Bounds height="35.0" width="35.0" x="90.0" y="260.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="usertask3" id="BPMNShape_usertask3">
<omgdc:Bounds height="55.0" width="105.0" x="170.0" y="250.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
<omgdi:waypoint x="75.0" y="117.0"></omgdi:waypoint>
<omgdi:waypoint x="120.0" y="117.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
<omgdi:waypoint x="225.0" y="117.0"></omgdi:waypoint>
<omgdi:waypoint x="270.0" y="117.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
<omgdi:waypoint x="375.0" y="117.0"></omgdi:waypoint>
<omgdi:waypoint x="420.0" y="117.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">
<omgdi:waypoint x="125.0" y="277.0"></omgdi:waypoint>
<omgdi:waypoint x="170.0" y="277.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>