Prevent Most Common Deployment Errors Through Linting
See original GitHub issue_Implementation issue for https://github.com/camunda/product-hub/issues/386._
Problem you would like to solve
As a user of the Camunda Modeler, my goal is to implement executable processes. Errors in my process are indicated through linting.
Proposed solution
I want to rely on linting to catch the most common deployment errors.
Errors
⛔ Invalid BPMN 2.0
The only way we were able to reproduce this error was uploading invalid BPMN 2.0 to the web modeler that would display just fine but would result in an error upon deployment since the Zeebe engine is stricter.
XML
<?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:modeler="http://camunda.org/schema/modeler/1.0"
id="Definitions_0qqsq85"
targetNamespace="http://bpmn.io/schema/bpmn"
exporter="Camunda Modeler"
exporterVersion="5.5.0"
modeler:executionPlatform="Camunda Cloud"
modeler:executionPlatformVersion="8.1.0">
<bpmn:process id="Process_1" isExecutable="true">
<bpmn:startEvent id="StartEvent_1" foo="bar">
<bpmn:extensionElements>
<Foo />
</bpmn:extensionElements>
</bpmn:startEvent>
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1">
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
<dc:Bounds x="179" y="79" width="36" height="36" />
</bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>
Opening this XML in the Camunda Modeler results in a warning:
This warning isn’t displayed in the web modeler. However, deploying the XML results in the cryptic SAXException while parsing input stream
error:
Related to https://github.com/camunda/zeebe/issues/5490.
⛔ Missing Sequence Flow Condition
Sequence flows must have a condition or be the default sequence flow (already implemented for bpmn:InclusiveGateway
cf. https://github.com/camunda/bpmnlint-plugin-camunda-compat/pull/44).
⛔ No Executable Process
At least one process must be executable (cf. https://github.com/camunda/zeebe/blob/1.3.0/bpmn-model/src/main/java/io/camunda/zeebe/model/bpmn/validation/zeebe/DefinitionsValidator.java#L37).
⛔ Unknown Elements
This error (Unable to process unknown element with name properties
) is most likely caused by deploying diagrams with zeebe:Properties
extension elements to Zeebe engine versions that do not support these extension elements. A lint rule (cf. https://github.com/camunda/bpmnlint-plugin-camunda-compat/pull/43) was introduced that should prevent this error in the future.
Alternatives considered
None.
Additional context
Tracked in https://github.com/camunda/product-hub/issues/386.
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:10 (10 by maintainers)
Top GitHub Comments
This could lead to unexpected behavior, too. The diagram might contain extensions the user doesn’t want to accidentally remove by importing (and maybe exporting) the diagram. The roundtrip should work without surprises.
As additional context (maybe helping you to find an appropriate solution) either of the following headless “validation” options can help you to determine the soundness of a BPMN diagram:
errors
+warnings