[bpmn2] process element sequence in Semantic.xsd [message #718953] |
Thu, 25 August 2011 16:28 |
tsurdilo Messages: 41 Registered: February 2011 |
Member |
|
|
Hi all, I was looking at Semantic.xsd where the process element complex type determines the sequence of its containing elements:
<xsd:element name="process" type="tProcess" substitutionGroup="rootElement"/>
<xsd:complexType name="tProcess">
<xsd:complexContent>
<xsd:extension base="tCallableElement">
<xsd:sequence>
<xsd:element ref="auditing" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="monitoring" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="property" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="laneSet" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="flowElement" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="artifact" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="supports" type="xsd:QName" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="processType" type="tProcessType" default="none"/>
<xsd:attribute name="isClosed" type="xsd:boolean" default="false"/>
<xsd:attribute name="definitionalCollaborationRef" type="xsd:QName" use="optional"/>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
the eclipse.bpmn2 model seems to not follow this sequence. For example it places the property elements on the process as last elements after all other, which then causes runtime engines who's parsers conform to Semantic.xsd to throw parsing errors.
I noted that BPMN2.0.ecore does follow this sequence and define the right order of sub-elements of the Process element, however the resulting BPMN2 XML does not seem to follow it.
Is there a setting I am missing that forces the order of elements in the resulting xml as defined in the ecore model?
Thanks for any input!!
[Updated on: Thu, 25 August 2011 16:45] Report message to a moderator
|
|
|
Re: [bpmn2] process element sequence in Semantic.xsd [message #719413 is a reply to message #718953] |
Sat, 27 August 2011 01:24 |
tsurdilo Messages: 41 Registered: February 2011 |
Member |
|
|
I understand now why this is happening. In BPMN20.ecore looking specifically at the Process element. The Process element extends CallableElement and FlowElementContainer:
Process->CallableElement, FlowElementContainer
Process itself defines it's own elements and attributes, for sake of example it has:
Process->CallableElement, FlowElementContainer
auditing
monitoring
properties
....
Let's look at FlowElementContainer:
FlowElementContainer -> BaseElement
laneSets
flowElements
What happens during generation of the output bpmn2 when processing element nodes, _first_ the elements of the extended nodes are printed out, _then_ the elements of the actual node, so in this example the elements of FlowElementContainer (laneSets, flowElements) will always come before the Process elements (auditing, monitoring, properties).
This however does not conform to Semantic.xml .. and I don't know if there was ever an intention to do that or not.
Unless there is some setting that I don't know of to pick the elements of the actual nodes _before_ ones of nodes it extends, I don't know how this would be feasible to implements without an ecore rewrite.
Please let me know what you think.
Thanks.
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03902 seconds