Skip to content

Commit

Permalink
test: make sure sub-process-blank-start-event also applies to an ad…
Browse files Browse the repository at this point in the history
…-hoc sub-process
  • Loading branch information
jarekdanielak authored and nikku committed Feb 17, 2025
1 parent 40063b2 commit 89a8f7a
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/rules/sub-process-blank-start-event.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ RuleTester.verify('sub-process-blank-start-event', rule, {
message: 'Start event must be blank',
path: [ 'eventDefinitions' ]
}
},
{
moddleElement: readModdle(__dirname + '/sub-process-blank-start-event/invalid-ad-hoc.bpmn'),
report: {
id: 'StartEvent',
message: 'Start event must be blank',
path: [ 'eventDefinitions' ]
}
}
]
});
20 changes: 20 additions & 0 deletions test/rules/sub-process-blank-start-event/invalid-ad-hoc.bpmn
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?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" id="Definitions_1ntx4rf" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.16.2">
<bpmn:process id="Process_1" isExecutable="true">
<bpmn:adHocSubProcess id="SubProcess_0zz45ap">
<bpmn:startEvent id="StartEvent">
<bpmn:messageEventDefinition />
</bpmn:startEvent>
</bpmn:adHocSubProcess>
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1">
<bpmndi:BPMNShape id="SubProcess_0zz45ap_di" bpmnElement="SubProcess_0zz45ap" isExpanded="true">
<dc:Bounds x="112" y="65" width="350" height="200" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="StartEvent_13o4awz_di" bpmnElement="StartEvent">
<dc:Bounds x="185" y="116" width="36" height="36" />
</bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>

0 comments on commit 89a8f7a

Please sign in to comment.