Could not trigger intermediate message event @Event Sub-Process

Hi

I am using Flowable 6.1.0 (latest version)

I have modeled an intermediate message event on ‘Event Sub-Process’ component. I am trying to invoke intermediate message event, but could not succeed.

Invoking the Process instance
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(“SubProcessSample”);

Invoking intermediate message event using below code:
List executionList = runtimeService.getAdhocSubProcessExecutions(processInstanceID);
if(executionList != null) {
for(Execution execution: executionList) {
runtimeService.messageEventReceivedAsync(“childmessageref”, execution.getId());
}
}

Here, Execution list is returned empty, eventhough i have modeled an intermediate message event as part of adhoc sub-process

Question

  1. Eventhough there is a sub-process modeled as part of the bpmn file, could not find the entry under Sub-Process tab in flowable-admin portal?

  2. Why could not trigger message to the intermediate event in event sub-process?

Kindly need your inputs on this. Thanks

SubProcessSample.bpmn20.xml

file:



SubProcessSample



<modeler:activiti-idm-assignee xmlns:modeler=“http://flowable.org/modeler”></modeler:activiti-idm-assignee>
<modeler:assignee-info-email xmlns:modeler=“http://flowable.org/modeler”></modeler:assignee-info-email>
<modeler:assignee-info-firstname xmlns:modeler=“http://flowable.org/modeler”></modeler:assignee-info-firstname>
<modeler:assignee-info-lastname xmlns:modeler=“http://flowable.org/modeler”></modeler:assignee-info-lastname>
<modeler:initiator-can-complete xmlns:modeler=“http://flowable.org/modeler”></modeler:initiator-can-complete>











<modeler:activiti-idm-assignee xmlns:modeler=“http://flowable.org/modeler”></modeler:activiti-idm-assignee>
<modeler:assignee-info-email xmlns:modeler=“http://flowable.org/modeler”></modeler:assignee-info-email>
<modeler:assignee-info-firstname xmlns:modeler=“http://flowable.org/modeler”></modeler:assignee-info-firstname>
<modeler:assignee-info-lastname xmlns:modeler=“http://flowable.org/modeler”></modeler:assignee-info-lastname>
<modeler:initiator-can-complete xmlns:modeler=“http://flowable.org/modeler”></modeler:initiator-can-complete>







<bpmndi:BPMNDiagram id=“BPMNDiagram_SubProcessSample”>
<bpmndi:BPMNPlane bpmnElement=“SubProcessSample” id=“BPMNPlane_SubProcessSample”>
<bpmndi:BPMNShape bpmnElement=“startEvent1” id=“BPMNShape_startEvent1”>
<omgdc:Bounds height=“35.0” width=“35.0” x=“100.0” y=“163.0”></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement=“task1” id=“BPMNShape_task1”>
<omgdc:Bounds height=“80.0” width=“100.0” x=“165.0” y=“135.0”></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement=“sid-98F42625-B562-4638-B7D4-C42122F3E493” id=“BPMNShape_sid-98F42625-B562-4638-B7D4-C42122F3E493”>
<omgdc:Bounds height=“35.0” width=“35.0” x=“320.0” y=“164.0”></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement=“eventsubprocess1” id=“BPMNShape_eventsubprocess1”>
<omgdc:Bounds height=“173.0” width=“518.0” x=“150.0” y=“255.0”></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement=“childmessage1” id=“BPMNShape_childmessage1”>
<omgdc:Bounds height=“35.0” width=“35.0” x=“180.0” y=“320.0”></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement=“subtask1” id=“BPMNShape_subtask1”>
<omgdc:Bounds height=“80.0” width=“100.0” x=“255.0” y=“295.0”></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement=“sid-6621D79E-E9AE-4D35-AF5C-68C54A9F268F” id=“BPMNShape_sid-6621D79E-E9AE-4D35-AF5C-68C54A9F268F”>
<omgdc:Bounds height=“35.0” width=“35.0” x=“400.0” y=“321.0”></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement=“sid-89709EEE-7EDF-4A2D-B46C-173268328A7C” id=“BPMNEdge_sid-89709EEE-7EDF-4A2D-B46C-173268328A7C”>
<omgdi:waypoint x=“135.0” y=“180.0”></omgdi:waypoint>
<omgdi:waypoint x=“165.0” y=“175.0”></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement=“sid-2ADDB15C-885C-43F6-ABDF-5BC837088735” id=“BPMNEdge_sid-2ADDB15C-885C-43F6-ABDF-5BC837088735”>
<omgdi:waypoint x=“265.0” y=“175.0”></omgdi:waypoint>
<omgdi:waypoint x=“292.0” y=“175.0”></omgdi:waypoint>
<omgdi:waypoint x=“292.0” y=“178.0”></omgdi:waypoint>
<omgdi:waypoint x=“320.0” y=“181.0”></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement=“sid-3388556D-E801-4EF6-A9C8-C743899B9574” id=“BPMNEdge_sid-3388556D-E801-4EF6-A9C8-C743899B9574”>
<omgdi:waypoint x=“215.0” y=“337.0”></omgdi:waypoint>
<omgdi:waypoint x=“255.0” y=“335.0”></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement=“sid-8A526A75-D8E9-47CB-A614-D2D47CED8E35” id=“BPMNEdge_sid-8A526A75-D8E9-47CB-A614-D2D47CED8E35”>
<omgdi:waypoint x=“355.0” y=“335.0”></omgdi:waypoint>
<omgdi:waypoint x=“400.0” y=“338.0”></omgdi:waypoint>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>

An event subprocess cannot have an intermediate event as start event, switch it to a real start event and it should work.