How can I add custom XML tags in a BPMN file? -


in bpmn file there 2 main components, process , diagram.

<?xml version="1.0" encoding="utf-8"?>  <definitions id="definition"              targetnamespace="http://www.example.org/minimalexample"              typelanguage="http://www.java.com/javatypes"              expressionlanguage="http://www.mvel.org/2.0"              xmlns="http://www.omg.org/spec/bpmn/20100524/model"              xmlns:xs="http://www.w3.org/2001/xmlschema-instance"              xs:schemalocation="http://www.omg.org/spec/bpmn/20100524/model bpmn20.xsd"              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:tns="http://www.jboss.org/drools">    <process processtype="private" isexecutable="true" id="com.sample.helloworld" name="hello world" >      <!-- nodes -->     <startevent id="_1" name="startprocess" />     <scripttask id="_2" name="hello" >       <script>system.out.println("hello world");</script>     </scripttask>     <endevent id="_3" name="endprocess" >         <terminateeventdefinition/>     </endevent>      <!-- connections -->     <sequenceflow id="_1-_2" sourceref="_1" targetref="_2" />     <sequenceflow id="_2-_3" sourceref="_2" targetref="_3" />    </process>    <bpmndi:bpmndiagram>     <bpmndi:bpmnplane bpmnelement="minimal" >       <bpmndi:bpmnshape bpmnelement="_1" >         <dc:bounds x="15" y="91" width="48" height="48" />       </bpmndi:bpmnshape>       <bpmndi:bpmnshape bpmnelement="_2" >         <dc:bounds x="95" y="88" width="83" height="48" />       </bpmndi:bpmnshape>       <bpmndi:bpmnshape bpmnelement="_3" >         <dc:bounds x="258" y="86" width="48" height="48" />       </bpmndi:bpmnshape>       <bpmndi:bpmnedge bpmnelement="_1-_2" >         <di:waypoint x="39" y="115" />         <di:waypoint x="75" y="46" />         <di:waypoint x="136" y="112" />       </bpmndi:bpmnedge>       <bpmndi:bpmnedge bpmnelement="_2-_3" >         <di:waypoint x="136" y="112" />         <di:waypoint x="240" y="240" />         <di:waypoint x="282" y="110" />       </bpmndi:bpmnedge>     </bpmndi:bpmnplane>   </bpmndi:bpmndiagram>  </definitions> 

i looking way add third section after diagram part of xml. want add custom xml tags can run xml through system , have system pick custom xml. looking way edit "definitions" tag include third section can add xml into. there xmlschema attribute let me add tags? this:

<?xml version="1.0" encoding="utf-8"?>  <definitions id="definition"...>    <process .....  </process>    <bpmndi:bpmndiagram>     <bpmndi:bpmnplane bpmnelement="minimal" >       ......     </bpmndi:bpmnplane>   </bpmndi:bpmndiagram>    <mynewsection>     <newtag>        <newtag2>           ...        </newtag2>        <newtag3>           ...        </newtag3>     </newtag>   </mynewsection> </definitions> 

from http://www.omg.org/spec/bpmn/20100501/bpmn20.xsd

<xsd:element name="definitions" type="tdefinitions"/> <xsd:complextype name="tdefinitions">     <xsd:sequence>         <xsd:element ref="import" minoccurs="0" maxoccurs="unbounded"/>         <xsd:element ref="extension" minoccurs="0" maxoccurs="unbounded"/>         <xsd:element ref="rootelement" minoccurs="0" maxoccurs="unbounded"/>         <xsd:element ref="bpmndi:bpmndiagram" minoccurs="0" maxoccurs="unbounded"/>         <xsd:element ref="relationship" minoccurs="0" maxoccurs="unbounded"/>     </xsd:sequence>     ...     <xsd:anyattribute namespace="##other" processcontents="lax"/> </xsd:complextype> 

because tdefinitions type doesn't extend tbaseelement, not possible extend extensionelements element, free include own attribute extensions @ will.

after looking http://www.omg.org/spec/bpmn/20100501/semantic.xsd, seems process element 1 of many top-level elements in substitutiongroup rootelement.

maybe go read on xml schema substitution groups see if can tap external schema or if must able modify source schema in case you'd forking bpmn spec.

hope helps , please report if find way extend definitions element outside schema.


Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -