Closed ghost closed 1 year ago
From a first look, I believe that the usage of the Bound Envelope decorator is correct.
For more details see attached document SchemaValidationError.pdf
I think you have actually highlighted a defect in the normative DI.xsd that invalidates the deco extension.
BPMNEnvelopeDecorator
should be wrapped in extensionElements
rather than di:extension
.extensionElements
which is part of the semantic model not the DI or BPMNDI models.di:extension
is the analogous wrapper in DI but there is a key difference: extensionElements
includes <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
- note the processContents="lax"
. This is missing from the declaration of di:extension
.di:extension
has strict
validation. I initially thought this meant that we just needed to provide an xsi:schemaLocation
to direct the validator to a copy of the deco xsd but this made no difference. Maybe someone can spot a problem with this modified example including the schemaLocation? bpmn-envelope-decorator-bounds.bpmn.txtBPMNEnvelopeDecorator
. This validates fine but obviously we cannot just change that file, which is part of the spec. Similarly adding lax processing to DI extension also allows it to validate and that is the solution I believe we should go forward with (as and when there is an update taskforce!).So to conclude, I believe it is impossible to extend BPMNEdge in the current spec.
I can reproduce the schema validation issue with both files:
$ validbpmn bpmn-envelope-decorator-bounds.bpmn
bpmn-envelope-decorator-bounds.bpmn:1627: element BPMNEnvelopeDecorator: Schemas validity error : Element '{http://www.omg.org/spec/BPMN/non-normative/extensions/envelope-decorator-bounds/1.0}BPMNEnvelopeDecorator': No matching global element declaration available, but demanded by the strict wildcard.
bpmn-envelope-decorator-bounds.bpmn fails to validate
$ validbpmn bpmn-envelope-decorator-bounds.bpmn.txt
bpmn-envelope-decorator-bounds.bpmn.txt:1627: element BPMNEnvelopeDecorator: Schemas validity error : Element '{http://www.omg.org/spec/BPMN/non-normative/extensions/envelope-decorator-bounds/1.0}BPMNEnvelopeDecorator': No matching global element declaration available, but demanded by the strict wildcard.
bpmn-envelope-decorator-bounds.bpmn.txt fails to validate
This issue was discussed on the 2021-10-13 meeting. We all agree with @tstephen assessment.
This leaves us with either removing this extension or correcting it.
After I've re-checked the XSD:
<xsd:complexType abstract="true" name="DiagramElement">
<xsd:sequence>
<xsd:element name="extension" minOccurs="0">
<xsd:complexType>
<xsd:sequence>
<xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="id" type="xsd:ID"/>
<xsd:anyAttribute namespace="##other" processContents="lax"/>
</xsd:complexType>
There is a potential workaround using the anyAttribute
<xsd:anyAttribute namespace="##other" processContents="lax"/>
I believe that we could transform the example to:
<bpmndi:BPMNEdge bpmnElement="_09e7cb23-4a1b-4165-b93a-cf635c223ee5" messageVisibleKind="initiating" id="E1373638081031__09e7cb23-4a1b-4165-b93a-cf635c223ee5" deco:height="12" deco:width="17" deco:x="209" deco:y="336.0">
<di:waypoint x="305.0" y="188.0"/>
<di:waypoint x="305.0" y="342.0"/>
<di:waypoint x="130.0" y="342.0"/>
<di:waypoint x="131.0" y="651.0"/>
<bpmndi:BPMNLabel labelStyle="LS1373638080849">
<dc:Bounds height="12.804751171875008" width="94.93333333333335" x="167.10533963254568" y="359.56612835107035"/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
Changing to using any attributes instead of an element:
<bpmndi:BPMNEdge bpmnElement="_09e7cb23-4a1b-4165-b93a-cf635c223ee5" messageVisibleKind="initiating" id="E1373638081031__09e7cb23-4a1b-4165-b93a-cf635c223ee5" deco:height="12" deco:width="17" deco:x="209" deco:y="336.0">
This is the same approach that was taken for the BPMN in color extension.
Thoughts?
With ARIS 10.0.16 the Extension for Envelope Decorator Bounds is not supported anymore. Without this extension the schema validation is now successful.
1 Jun 2022 Webmeeting o We confirmed that this is indeed an issue with our BPMN MIWG extension which was introduced based on a wrong assumption about DI o A new version of the BPMN MIWG extension will be created.
5 Oct 2022 Webmeeting o We will apply the change to the schema as suggested by Simon on 13 Oct 2021 o We will then modify the B.2.0 example accordingly o Then do a round of vendor validation
This is strange because there is an XML validation script for the extension's example: https://github.com/bpmn-miwg/bpmn-deco/blob/master/test-validation-of-example.sh Maybe that's broken. I'll investigate...
Schema validation seems to work, if the extension schema is included in the validation:
$ xmllint --schema 'bpmn/BPMN20.xsd' --noout bpmn-envelope-decorator-bounds.bpmn
bpmn-envelope-decorator-bounds.bpmn:1627: element BPMNEnvelopeDecorator: Schemas validity error : Element '{http://www.omg.org/spec/BPMN/non-normative/extensions/envelope-decorator-bounds/1.0}BPMNEnvelopeDecorator': No matching global element declaration available, but demanded by the strict wildcard.
bpmn-envelope-decorator-bounds.bpmn fails to validate
$ xmllint --schema 'bpmn/BPMN20.xsd' --schema bpmn-envelope-decorator-bounds.xsd --noout bpmn-envelope-decorator-bounds.bpmn
bpmn-envelope-decorator-bounds.bpmn validates
I've made the PR for the envelope decorator bound: https://github.com/bpmn-miwg/bpmn-deco/pull/1
Testcase B.2.0, Roundtrip, Tool SoftwareAG ARIS 10.0.14: Schema validation fails.
Schema validation error: Error Line 1802: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'deco:BPMNEnvelopeDecorator'.