Skip to content

Commit

Permalink
fix: boundary event labels
Browse files Browse the repository at this point in the history
Closes #141
  • Loading branch information
abdul99ahad committed Aug 30, 2024
1 parent 87c0b5d commit a0b8254
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 13 deletions.
4 changes: 0 additions & 4 deletions rules/label-required.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ module.exports = function() {
return;
}

if (is(node, 'bpmn:BoundaryEvent')) {
return;
}

// ignore sub-processes
if (is(node, 'bpmn:SubProcess')) {

Expand Down
4 changes: 0 additions & 4 deletions test/integration/bundling/test/app.rollup.expected.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,6 @@
return;
}

if (is$2(node, 'bpmn:BoundaryEvent')) {
return;
}

// ignore sub-processes
if (is$2(node, 'bpmn:SubProcess')) {

Expand Down
4 changes: 0 additions & 4 deletions test/integration/bundling/test/app.webpack.expected.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,6 @@ module.exports = function() {
return;
}

if (is(node, 'bpmn:BoundaryEvent')) {
return;
}

// ignore sub-processes
if (is(node, 'bpmn:SubProcess')) {

Expand Down
7 changes: 7 additions & 0 deletions test/rules/label-required.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,13 @@ RuleTester.verify('label-required', rule, {
message,
path: [ 'name' ]
}
},{
moddleElement: readModdle(__dirname + '/label-required/invalid-boundary-event.bpmn'),
report: {
id: 'Element',
message,
path: [ 'name' ]
}
}
]
});
20 changes: 20 additions & 0 deletions test/rules/label-required/invalid-boundary-event.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_027stl5" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="5.25.0">
<bpmn:process id="Process_1" isExecutable="true">
<bpmn:subProcess id="SubProcess_0w2vmlo" />
<bpmn:boundaryEvent id="Element" attachedToRef="SubProcess_0w2vmlo" />
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1">
<bpmndi:BPMNShape id="SubProcess_0w2vmlo_di" bpmnElement="SubProcess_0w2vmlo" isExpanded="true">
<dc:Bounds x="127" y="89" width="350" height="200" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Element_di" bpmnElement="Element">
<dc:Bounds x="266" y="271" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="281" y="314" width="7" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>
2 changes: 1 addition & 1 deletion test/rules/label-required/valid-boundary-event.bpmn
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<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_027stl5" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.16.2">
<bpmn:process id="Process_1" isExecutable="true">
<bpmn:subProcess id="SubProcess_0w2vmlo" />
<bpmn:boundaryEvent id="BoundaryEvent_1wvvk9q" attachedToRef="SubProcess_0w2vmlo" />
<bpmn:boundaryEvent id="BoundaryEvent_1wvvk9q" name="Q" attachedToRef="SubProcess_0w2vmlo" />
<bpmn:boundaryEvent id="BoundaryEvent_1cd1p27" name="A" attachedToRef="SubProcess_0w2vmlo" />
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
Expand Down

0 comments on commit a0b8254

Please sign in to comment.