In our project we are experiencing problems with Camunda recognizing MessageEvent definitions (both StartEvent / IntermediateEvent) when message are difined using an EventDefinitionRef instead of a MessageEventDefinition.
Error in Camunda or am I doing something wrong?
Best, Rob.
See simple example BPMN files below.
======================================
BPMN file with EventDefintionRef, StartEvent not recognized as MessageStartEvent:
<?xml version="1.0" encoding="UTF-8"?>
<semantic:messageEventDefinition id="MESSAGE_EVENT_DEF_1" messageRef="MESSAGE_1" />
<semantic:message id="MESSAGE_1" />
<semantic:process id="PROCESS_1" isExecutable="true" name="Simple BPMN Process Diagram">
<semantic:laneSet id="LANESET_1">
<semantic:lane id="FLOWNODE_1" name="SalesSupport">
<semantic:flowNodeRef>FLOWNODE_2</semantic:flowNodeRef>
<semantic:flowNodeRef>FLOWNODE_3</semantic:flowNodeRef>
<semantic:flowNodeRef>FLOWNODE_4</semantic:flowNodeRef>
</semantic:lane>
</semantic:laneSet>
<semantic:startEvent id="FLOWNODE_2" name="RequestForOfferReceived">
<semantic:outgoing>FLOW_1</semantic:outgoing>
<semantic:eventDefinitionRef>MESSAGE_EVENT_DEF_1</semantic:eventDefinitionRef>
</semantic:startEvent>
<semantic:task id="FLOWNODE_3" name="ProcessRequest">
<semantic:incoming>FLOW_1</semantic:incoming>
<semantic:outgoing>FLOW_2</semantic:outgoing>
</semantic:task>
<semantic:endEvent id="FLOWNODE_4" name="RequestProcessed">
<semantic:incoming>FLOW_2</semantic:incoming>
</semantic:endEvent>
<semantic:sequenceFlow id="FLOW_1" sourceRef="FLOWNODE_2" targetRef="FLOWNODE_3" />
<semantic:sequenceFlow id="FLOW_2" sourceRef="FLOWNODE_3" targetRef="FLOWNODE_4" />
</semantic:process>
<bpmndi:BPMNDiagram id="DIAGRAM_1" name="Simple BPMN Process Diagram">
<bpmndi:BPMNPlane bpmnElement="PROCESS_1">
<bpmndi:BPMNEdge bpmnElement="FLOW_1" id="EDGE_1">
<di:waypoint x="423" y="223" />
<di:waypoint x="516" y="223" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="FLOW_2" id="EDGE_2">
<di:waypoint x="613" y="223" />
<di:waypoint x="707" y="223" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape bpmnElement="FLOWNODE_1" id="BPMNDI_FLOWNODE_1">
<dc:Bounds height="131" width="591" x="335" y="157" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="FLOWNODE_2" id="BPMNDI_FLOWNODE_2">
<dc:Bounds height="32" width="32" x="391" y="207" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="FLOWNODE_3" id="BPMNDI_FLOWNODE_3">
<dc:Bounds height="59" width="96" x="516" y="193" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="FLOWNODE_4" id="BPMNDI_FLOWNODE_4">
<dc:Bounds height="30" width="30" x="707" y="208" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</semantic:definitions>
======================================
BPMN file with MessageEventDefinition, regognized correctly as MessageStartEvent:
<?xml version="1.0" encoding="UTF-8"?>
<semantic:messageEventDefinition id="MESSAGE_EVENT_DEF_1" messageRef="MESSAGE_1" />
<semantic:message id="MESSAGE_1" />
<semantic:process id="PROCESS_1" isExecutable="true" name="Simple BPMN Process Diagram">
<semantic:laneSet id="LANESET_1">
<semantic:lane id="FLOWNODE_1" name="SalesSupport">
<semantic:flowNodeRef>FLOWNODE_2</semantic:flowNodeRef>
<semantic:flowNodeRef>FLOWNODE_3</semantic:flowNodeRef>
<semantic:flowNodeRef>FLOWNODE_4</semantic:flowNodeRef>
</semantic:lane>
</semantic:laneSet>
<semantic:startEvent id="FLOWNODE_2" name="RequestForOfferReceived">
<semantic:outgoing>FLOW_1</semantic:outgoing>
<!-- <semantic:eventDefinitionRef>MESSAGE_EVENT_DEF_1</semantic:eventDefinitionRef> DELETED LINE -->
<semantic:messageEventDefinition id="MESSAGE_EVENT_DEF_1" messageRef="MESSAGE_1"/> <!-- INSERTED LINE -->
</semantic:startEvent>
<semantic:task id="FLOWNODE_3" name="ProcessRequest">
<semantic:incoming>FLOW_1</semantic:incoming>
<semantic:outgoing>FLOW_2</semantic:outgoing>
</semantic:task>
<semantic:endEvent id="FLOWNODE_4" name="RequestProcessed">
<semantic:incoming>FLOW_2</semantic:incoming>
</semantic:endEvent>
<semantic:sequenceFlow id="FLOW_1" sourceRef="FLOWNODE_2" targetRef="FLOWNODE_3" />
<semantic:sequenceFlow id="FLOW_2" sourceRef="FLOWNODE_3" targetRef="FLOWNODE_4" />
</semantic:process>
<bpmndi:BPMNDiagram id="DIAGRAM_1" name="Simple BPMN Process Diagram">
<bpmndi:BPMNPlane bpmnElement="PROCESS_1">
<bpmndi:BPMNEdge bpmnElement="FLOW_1" id="EDGE_1">
<di:waypoint x="423" y="223" />
<di:waypoint x="516" y="223" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="FLOW_2" id="EDGE_2">
<di:waypoint x="613" y="223" />
<di:waypoint x="707" y="223" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape bpmnElement="FLOWNODE_1" id="BPMNDI_FLOWNODE_1">
<dc:Bounds height="131" width="591" x="335" y="157" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="FLOWNODE_2" id="BPMNDI_FLOWNODE_2">
<dc:Bounds height="32" width="32" x="391" y="207" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="FLOWNODE_3" id="BPMNDI_FLOWNODE_3">
<dc:Bounds height="59" width="96" x="516" y="193" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="FLOWNODE_4" id="BPMNDI_FLOWNODE_4">
<dc:Bounds height="30" width="30" x="707" y="208" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</semantic:definitions>