Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » MDT (Model Development Tools) » [bpmn2] process element sequence in Semantic.xsd
[bpmn2] process element sequence in Semantic.xsd [message #718953] Thu, 25 August 2011 16:28 Go to next message
tsurdilo  is currently offline tsurdilo Friend
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 Go to previous messageGo to next message
tsurdilo  is currently offline tsurdilo Friend
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.
Re: [bpmn2] process element sequence in Semantic.xsd [message #719960 is a reply to message #719413] Mon, 29 August 2011 15:08 Go to previous messageGo to next message
tsurdilo  is currently offline tsurdilo Friend
Messages: 41
Registered: February 2011
Member
Answering my own question here - need to use OPTION_USE_CACHED_LOOKUP_TABLE and create own implementation of XMLSaveImpl.Lookup where need to override
getFeatures to return features in the order we want them to appear in the output.
Re: [bpmn2] process element sequence in Semantic.xsd [message #723422 is a reply to message #719960] Thu, 08 September 2011 14:13 Go to previous messageGo to next message
Henning Heitkoetter is currently offline Henning HeitkoetterFriend
Messages: 21
Registered: April 2010
Junior Member
Hello tsurdilo,

thanks for pointing this out and giving a hint on how to resolve this issue. Bug 357088 (https://bugs.eclipse.org/bugs/show_bug.cgi?id=357088) tracks the further development.

This is probably due to multi inheritance not possible in XSD. It would have been easier if the Semantic.xsd had used the order 1) "children of implicit super type" (as in XMI; laneSets, flowElements), 2) own children - instead of mixing the (implicitly) inherited children in between Sad

Regards,
Henning
Re: [bpmn2] process element sequence in Semantic.xsd [message #731720 is a reply to message #723422] Sun, 02 October 2011 17:22 Go to previous messageGo to next message
tsurdilo  is currently offline tsurdilo Friend
Messages: 41
Registered: February 2011
Member
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.
Re: [bpmn2] process element sequence in Semantic.xsd [message #731724 is a reply to message #723422] Sun, 02 October 2011 18:22 Go to previous message
tsurdilo  is currently offline tsurdilo Friend
Messages: 41
Registered: February 2011
Member
Left comment with impl comments on Bug 357088 (https://bugs.eclipse.org/bugs/show_bug.cgi?id=357088). Thanks.

[Updated on: Sun, 02 October 2011 18:22]

Report message to a moderator

Previous Topic:OCLinEcore Editor in standalone application
Next Topic:[BPMN2] New BPMN Visual design tool is available
Goto Forum:
  


Current Time: Fri Mar 29 01:44:58 GMT 2024

Powered by FUDForum. Page generated in 0.03902 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top