|
Re: How to extend the BPMN Plane [message #1238181 is a reply to message #1238137] |
Fri, 31 January 2014 15:34 |
|
Hi Basak,
According to the BPMNDI XML schema, BPMNDiagram has exactly one BPMNPlane, however that BPMNPlane may theoretically contain any number of BPMNPlane objects itself - the "planeElement" list of the DI "Plane" class is the container for BPMNShape, BPMNEdge, BPMNLabel and BPMNPlane objects. So (again theoretically, as I have never seen models that do this) it should be possible to have something like this:
<bpmndi:BPMNDiagram ...>
<bpmndi:BPMNPlane bpmnElement="process_2">
<bpmndi:BPMNShape ...>
...
<bpmndi:BPMNEdge ...>
...
<bpmndi:BPMNPlane bpmnElement="some base element referenced here???" ...>
<!-- a collection of BPMNShape, BPMNEdge, BPMNLabel and optionally more BPMNPlanes here??? -->
...
</bpmndi:BPMNPlane>
</bpmndi:BPMNPlane>
...
</bpmndi:BPMNDiagram>
However, keep in mind that a BPMNPlane can only reference a BaseElement of the types Process, SubProcess, AdHocSubProcess, Transaction,
Collaboration, Choreography or SubChoreography, and I believe this reference is REQUIRED, so your embedded BPMNPlane would need to reference one of these types of objects in your document. This is only a Semantic requirement of the BPMN2 specification, and (I think!) is not enforced by the XML schema, so depending on who or what will be consuming these types of models, you could probably omit this reference.
Also keep in mind that your embedded plane may only contain BPMNShape, BPMNEdge and BPMNLabel objects, so the overlay data you want to render in your editor would need to be contained in one of these types of objects (probably a BPMNLabel).
All that said, this is currently not possible with the BPMN2 Modeler, although I think it's a useful enhancement! Please feel free to file an enhancement request.
Cheers,
Bob
|
|
|
|
Re: How to extend the BPMN Plane [message #1238558 is a reply to message #1238525] |
Sat, 01 February 2014 18:37 |
|
You could use the BPMN2 "Relationship" extension mechanism and simply add your objects to the Definitions element (the document root). The XML might look something like this:
<bpmn2:definitions ...
...
<bpmn2:relationship>
<bpmn2:sources>
<!-- your overlay objects here... -->
</bpmn2:sources>
<bpmn2:targets>
</bpmn2:targets>
</bpmn2:relationship>
</bpmn2:definitions>
The jBPM plugin makes use of this mechanism to associate BPSim elements with BPMN activities. Have a look at the JbpmModelUtil class to see how these associations are created and managed.
|
|
|
|
Powered by
FUDForum. Page generated in 0.02813 seconds