[bpmn2] process element sequence in Semantic.xsd [message #718953] |
Thu, 25 August 2011 16:28  |
Eclipse User |
|
|
|
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] by Moderator 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   |
Eclipse User |
|
|
|
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.
|
|
|
|
|
Re: [bpmn2] process element sequence in Semantic.xsd [message #731720 is a reply to message #723422] |
Sun, 02 October 2011 17:22   |
Eclipse User |
|
|
|
Hi Henning, I figured out a solution which I could contribute to eclipse.bpmn2 if you guys want. Let me know...
It involves having to overwrite the XmlSaveImpl.Lookup class to change the looked up features and change them according to Semantic.xsd. I have been using it and it works fine so far.
Thanks.
|
|
|
|
Powered by
FUDForum. Page generated in 0.25210 seconds