Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add schema for attributes #2

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 21 additions & 18 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -1,33 +1,36 @@
BPMN 2.0 Extension for Envelope Decorator Bounds
================================================

link:bpmn-envelope-decorator-bounds.xsd[XML Schema including full Documentation]

link:https://falko.github.io/bpmn-extensions/envelope-decorator-bounds/bpmn-envelope-decorator-bounds.html[HTML Documentation generated from XML Schema]

This XML schema defines and documents BPMN 2.0 extension elements and
attributes to overcome limitations of BPMN Diagram Interchange.

In particular, the attribute envelopeDecoratorBounds allows to interchange the position and dimensions
of the envelope decorator on a BPMN Message Flow.
With this extension the Envelope Decorator can be freely positioned
along the Message Flow and not just in the middle of it.

image:bpmn-envelope-decorator-bounds.part.png["Envelope Decorator freely positioned along the Message Flow", link=bpmn-envelope-decorator-bounds.png]

link:bpmn-envelope-decorator-bounds.bpmn[Example BPMN File]


This extension is defined in the namespace: http://www.omg.org/spec/BPMN/non-normative/extensions/envelope-decorator-bounds/1.0

It does not come with a proper XSD since only attributes are contributed.

[source,xml]
----
<semantic:definitions ... xmlns:deco="http://www.omg.org/spec/BPMN/non-normative/extensions/envelope-decorator-bounds/1.0" ... >
...
<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>
...
</semantic:definitions>
<bpmndi:BPMNEdge bpmnElement="_09e7cb23-4a1b-4165-b93a-cf635c223ee5" messageVisibleKind="initiating" id="E1373638081031__09e7cb23-4a1b-4165-b93a-cf635c223ee5">
<extensionElements>
<deco:evelopeDecoratorBounds height="12" width="17" x="209" y="336.0"/>
</extensionElements>
<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>

----
## Implementers
Expand Down
7 changes: 6 additions & 1 deletion bpmn-envelope-decorator-bounds.bpmn
Original file line number Diff line number Diff line change
Expand Up @@ -1622,7 +1622,12 @@
<di:waypoint x="1429.0" y="497.0"/>
<bpmndi:BPMNLabel/>
</bpmndi:BPMNEdge>
<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">
<bpmndi:BPMNEdge bpmnElement="_09e7cb23-4a1b-4165-b93a-cf635c223ee5" messageVisibleKind="initiating" id="E1373638081031__09e7cb23-4a1b-4165-b93a-cf635c223ee5">
<di:extension>
<deco:BPMNEnvelopeDecorator>
<dc:Bounds height="12" width="17" x="209" y="336.0"/>
</deco:BPMNEnvelopeDecorator>
</di:extension>
<di:waypoint x="305.0" y="188.0"/>
<di:waypoint x="305.0" y="342.0"/>
<di:waypoint x="130.0" y="342.0"/>
Expand Down
68 changes: 68 additions & 0 deletions bpmn-envelope-decorator-bounds.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<?xml version="1.0" encoding="UTF-8"?>
<schema
xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.omg.org/spec/BPMN/non-normative/extensions/envelope-decorator-bounds/1.0"
xmlns:deco="http://www.omg.org/spec/BPMN/non-normative/extensions/envelope-decorator-bounds/1.0"
xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
xmlns:di="http://www.omg.org/spec/DD/20100524/DI"
xmlns:dc="http://www.omg.org/spec/DD/20100524/DC">

<import namespace="http://www.omg.org/spec/BPMN/20100524/MODEL" schemaLocation="bpmn/BPMN20.xsd" />
<import namespace="http://www.omg.org/spec/DD/20100524/DC" schemaLocation="bpmn/DC.xsd" />
<import namespace="http://www.omg.org/spec/DD/20100524/DI" schemaLocation="bpmn/DI.xsd" />

<annotation>
<documentation>
This XML schema defines and documents BPMN 2.0 extension elements and
attributes to overcome limitations of BPMN Diagram Interchange.
</documentation>
</annotation>

<element name="BPMNEnvelopeDecorator" type="deco:BPMNEnvelopeDecorator">
<annotation>
<documentation>
Extension element on bpmndi:BPMNEdge that reference a bpmn:MessageFlow

BPMNEnvelopeDecorator allows to interchange the position and dimensions
of the Envelope Decorator on a BPMN Message Flow.
With this extension the Envelope Decorator can be freely positioned
along the Message Flow and not just in the middle of it.

BPMN 2.1, page 411 (PDF 441) says:
"Note that for Message Flow with an envelope decorator, the envelope
decorator should be at the midpoint of the message flow. BPMN DI does
not provide an interchange of the bounds of the envelope decorator."

Example:
<bpmndi:BPMNEdge bpmnElement="_09e7cb23-4a1b-4165-b93a-cf635c223ee5" messageVisibleKind="initiating" id="E1373638081031__09e7cb23-4a1b-4165-b93a-cf635c223ee5">
<extensionElements>
<deco:BPMNEnvelopeDecorator>
<dc:Bounds height="12" width="17" x="209" y="336.0"/>
</deco:BPMNEnvelopeDecorator>
</extensionElements>
<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>

See also bpmn-envelope-decorator-bounds.png
</documentation>
</annotation>
</element>

<complexType name="BPMNEnvelopeDecorator">
<complexContent>
<extension base="di:Node">
<sequence>
<element ref="dc:Bounds" minOccurs="0" />
</sequence>
</extension>
</complexContent>
</complexType>

</schema>
2 changes: 1 addition & 1 deletion test-validation-of-example.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/sh
xmllint --schema 'bpmn/BPMN20.xsd' --noout bpmn-envelope-decorator-bounds.bpmn
xmllint --schema 'bpmn/BPMN20.xsd' --schema bpmn-envelope-decorator-bounds.xsd --noout bpmn-envelope-decorator-bounds.bpmn