Skip to content

Commit

Permalink
added tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanlukas committed Jul 3, 2024
1 parent 35bfe5e commit f30d735
Show file tree
Hide file tree
Showing 3 changed files with 145 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -614,4 +614,26 @@ void testZeebeUserTask_pre_8_5() {
assertThat(userTask).isNotNull();
assertThat(userTask.getChildElementsByNameNs(BPMN, "extensionElements")).isEmpty();
}

@Test
void testEscalationEventOnServiceTask() {
BpmnDiagramCheckResult bpmnDiagramCheckResult =
loadAndCheckAgainstVersion("escalation-on-service-task.bpmn", "8.5");
BpmnElementCheckResult itEscalatesBoundaryEvent =
bpmnDiagramCheckResult.getResult("ItEscalatesBoundaryEvent");
assertThat(itEscalatesBoundaryEvent).isNotNull();
assertThat(itEscalatesBoundaryEvent.getMessages()).hasSize(1);
assertThat(itEscalatesBoundaryEvent.getMessages().get(0).getMessage())
.isEqualTo(
"Element 'Escalation Boundary Event attached to Service Task' is not supported in Zeebe version '8.5'. Please review.");
}

@Test
void testEscalationEventOnSubProcess() {
BpmnDiagramCheckResult bpmnDiagramCheckResult = loadAndCheck("escalation-on-subprocess.bpmn");
BpmnElementCheckResult itEscalatesBoundaryEvent =
bpmnDiagramCheckResult.getResult("ItEscalatesBoundaryEvent");
assertThat(itEscalatesBoundaryEvent).isNotNull();
assertThat(itEscalatesBoundaryEvent.getMessages()).isEmpty();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:bpmn="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:zeebe="http://camunda.org/schema/zeebe/1.0" xmlns:modeler="http://camunda.org/schema/modeler/1.0" id="Definitions_0o5f2ei" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="5.25.0" modeler:executionPlatform="Camunda Platform" modeler:executionPlatformVersion="7.21.0">
<bpmn:process id="Process_03hu2sm" isExecutable="true">
<bpmn:startEvent id="StartEvent_1">
<bpmn:outgoing>Flow_0063qdx</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:sequenceFlow id="Flow_0063qdx" sourceRef="StartEvent_1" targetRef="DoSomethingTask" />
<bpmn:endEvent id="Event_099ya70">
<bpmn:incoming>Flow_0rq7o5f</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="Flow_0rq7o5f" sourceRef="DoSomethingTask" targetRef="Event_099ya70" />
<bpmn:boundaryEvent id="ItEscalatesBoundaryEvent" name="it escalates" attachedToRef="DoSomethingTask">
<bpmn:outgoing>Flow_0e2rqkz</bpmn:outgoing>
<bpmn:escalationEventDefinition id="EscalationEventDefinition_1bh088b" />
</bpmn:boundaryEvent>
<bpmn:endEvent id="Event_0omy07i">
<bpmn:incoming>Flow_0e2rqkz</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="Flow_0e2rqkz" sourceRef="ItEscalatesBoundaryEvent" targetRef="Event_0omy07i" />
<bpmn:serviceTask id="DoSomethingTask" name="Do something">
<bpmn:incoming>Flow_0063qdx</bpmn:incoming>
<bpmn:outgoing>Flow_0rq7o5f</bpmn:outgoing>
</bpmn:serviceTask>
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_03hu2sm">
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
<dc:Bounds x="179" y="99" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_099ya70_di" bpmnElement="Event_099ya70">
<dc:Bounds x="432" y="99" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_0omy07i_di" bpmnElement="Event_0omy07i">
<dc:Bounds x="442" y="222" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_1nassmt_di" bpmnElement="DoSomethingTask">
<dc:Bounds x="270" y="77" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_1x90my0_di" bpmnElement="ItEscalatesBoundaryEvent">
<dc:Bounds x="352" y="139" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="392" y="173" width="56" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="Flow_0063qdx_di" bpmnElement="Flow_0063qdx">
<di:waypoint x="215" y="117" />
<di:waypoint x="270" y="117" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0rq7o5f_di" bpmnElement="Flow_0rq7o5f">
<di:waypoint x="370" y="117" />
<di:waypoint x="432" y="117" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0e2rqkz_di" bpmnElement="Flow_0e2rqkz">
<di:waypoint x="370" y="175" />
<di:waypoint x="370" y="240" />
<di:waypoint x="442" y="240" />
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:bpmn="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:zeebe="http://camunda.org/schema/zeebe/1.0" xmlns:modeler="http://camunda.org/schema/modeler/1.0" id="Definitions_0o5f2ei" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="5.25.0" modeler:executionPlatform="Camunda Platform" modeler:executionPlatformVersion="7.21.0">
<bpmn:process id="Process_03hu2sm" isExecutable="true">
<bpmn:startEvent id="StartEvent_1">
<bpmn:outgoing>Flow_0063qdx</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:sequenceFlow id="Flow_0063qdx" sourceRef="StartEvent_1" targetRef="DoSomethingTask" />
<bpmn:endEvent id="Event_099ya70">
<bpmn:incoming>Flow_0rq7o5f</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="Flow_0rq7o5f" sourceRef="DoSomethingTask" targetRef="Event_099ya70" />
<bpmn:boundaryEvent id="ItEscalatesBoundaryEvent" name="it escalates" attachedToRef="DoSomethingTask">
<bpmn:outgoing>Flow_0e2rqkz</bpmn:outgoing>
<bpmn:escalationEventDefinition id="EscalationEventDefinition_1bh088b" />
</bpmn:boundaryEvent>
<bpmn:endEvent id="Event_0omy07i">
<bpmn:incoming>Flow_0e2rqkz</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="Flow_0e2rqkz" sourceRef="ItEscalatesBoundaryEvent" targetRef="Event_0omy07i" />
<bpmn:subProcess id="DoSomethingTask" name="Do something">
<bpmn:incoming>Flow_0063qdx</bpmn:incoming>
<bpmn:outgoing>Flow_0rq7o5f</bpmn:outgoing>
</bpmn:subProcess>
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_03hu2sm">
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
<dc:Bounds x="179" y="99" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_099ya70_di" bpmnElement="Event_099ya70">
<dc:Bounds x="432" y="99" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_0omy07i_di" bpmnElement="Event_0omy07i">
<dc:Bounds x="442" y="222" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_1lz75rz_di" bpmnElement="DoSomethingTask">
<dc:Bounds x="270" y="77" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_1x90my0_di" bpmnElement="ItEscalatesBoundaryEvent">
<dc:Bounds x="352" y="139" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="392" y="173" width="56" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="Flow_0063qdx_di" bpmnElement="Flow_0063qdx">
<di:waypoint x="215" y="117" />
<di:waypoint x="270" y="117" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0rq7o5f_di" bpmnElement="Flow_0rq7o5f">
<di:waypoint x="370" y="117" />
<di:waypoint x="432" y="117" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0e2rqkz_di" bpmnElement="Flow_0e2rqkz">
<di:waypoint x="370" y="175" />
<di:waypoint x="370" y="240" />
<di:waypoint x="442" y="240" />
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
<bpmndi:BPMNDiagram id="BPMNDiagram_1tnkkgo">
<bpmndi:BPMNPlane id="BPMNPlane_18aobgl" bpmnElement="DoSomethingTask" />
</bpmndi:BPMNDiagram>
</bpmn:definitions>

0 comments on commit f30d735

Please sign in to comment.