Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [bpmn-dev] Two questions regarding output of the eclipse.bpmn2 api

I understand now why the issue 2) 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
tsurdilo


On 8/26/11 4:15 PM, Tihomir Surdilovic wrote:
Hi guys, I am using eclipse.bpmn2 api to produce bpmn2 for the jBPM5 project and ran into two issues I would love to have some insight on.
Both questions are concerning the following example output:

<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.omg.org/bpmn20" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:drools="http://www.jboss.org/drools" id="6018529e-e1db-4fc7-abff-c8574c49e754" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" name="sa" targetNamespace="http://www.omg.org/bpmn20">
   <bpmn2:itemDefinition id="_xItem" structureRef="String"/>
      <bpmn2:process id="sa" drools:packageName="defaultPackage" drools:version="1" name="sa" isExecutable="true">
         <bpmn2:startEvent id="_0495796B-D9E5-4079-A6A9-EF9706011D7E" name="">
            <bpmn2:outgoing>_93664981-BF49-45BD-BED6-35CC0E512DEF</bpmn2:outgoing>
         </bpmn2:startEvent>
         ...
         <bpmn2:property id="x" itemSubjectRef="_xItem"/>
     </bpmn2:process>
...
</bpmn2:definitions>

1) The first problem I have is the id attribute of the definitions element. I do not know what in the ecore model controls its type. In BPMN20.ecore there is a Definitions element defined which extends from BaseElement, however changing the type of the id of BaseElement from EString to NCName (which is really needed here..the id should NOT start with a number) changes the type of all elements in the document EXCEPT the definitions element. Could someone please tell me what part of the ecore model determines the type of the id attribute of the definitions element?

2) The produced bpmn2 in my case has a big problem, in that it does not conform to Semantics.xml. Specifically Semantics.xml defines a sequence for the process element:

<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>


but if you can see for example eclipse.bpmn2 api produce output that does not follow this sequence (the property elements for example are placed as last ones).
This forces me to turn of xml validation alltogether when trying to execute the bpmn2 in runtime engines such as jBPM.
Is there a setting or anything else that forces the output xml to conform the the schemas I assume were used to create the ecore model?

I opened two questions on the user forums on this, but am getting no traction so asked Antoine and he recommended me to try this list.

Any inputs on this are very very welcome. I am willing to do any bug fixes and contribute patches in case any of these are actually bugs..so in that case just guidance is needed :)

Thanks!
Tihomir


Back to the top