Hello team, I’m working on a project extending the bpmn-js. In particular, we need to model in a BPMN compliant way the DataInput and the DataOutput elements. We followed the custom element guide and at this moment we can render them on the palette, dropping in the canvas, connecting to other elements and so on.
For what concerns the xml, we are using the classic dataobject tag with a custom argument datatype. The result is this:
<bpmn:dataObjectReference id=“DataObjectReference_0ytwlse” name=“Travel” dataObjectRef=“DataObject_0hg7ujh” datatype=“input”>
Our objective is to have the xml compliant with the BPMN standard (i.e.: bpmn:dataInput bpmn:dataOutput), can we achieve this without manually changing the xml?
If you can want add custom [extension] like input/output variables/parameters, you need implement custom moddle extension described in solution, with moddle extension you can extends properties of any element without manually changing xml on standard way.
thank you for this quick reply. If I’m understood well the moddle extension let define custom xml tags, like in the case of camunda moddle extension. Differently from this, we aim at add elements of the BPMN standard that are already defined in the classical moddle. In fact, if you try to open a .bpmn file with a datainput or a dataoutput, the bpmn.io modeler will show the elements, buthey can not be moved or connected to other elements.
your welcome, I think standard bpmn elements basically is fixed and with moddle extension you can extend standard bpmn elements properties/objects/…, For example if you want add data[I/O] to user element without predefined camunda moddle extension provider like [camunda:inputparameters] or etc…, You need to use cme*, this cme* attached to any element you want and in exported bpmn [as xml] you can see custom tags.
Please describe for me what your means or share picture of your idea to I can better help you.
*custom moddle extension
[sorry for bad english]
New Process (2) (1).bpmn (12.4 KB)
Well, this is a .bpmn model done with another modeler. It contains the DataInput and the DataOutput elements. By importing it in the bpmn.io modeler all the elements are rendered. This is due to the fact that those are standard elements of BPMN. Unfortunately, the modeler forbids to move it in the canvas or connecting it to task or other elements. We want to fix this problem and have the possibility to create this element from the palette.
I don’t believe that we have to completely follow the example of the moddle extensions…
I am working to achieve the same , Did you get the way to do it . Could you please share the way .?
Not completely. We managed to graphically show in the property panel of standard data objects a switch for transforming it to a data input/output. Thus, the modeler shows the arrow marker, but the corresponding XML element is still a standard data object.
To see the result you can try our online application here http://pros.unicam.it:8080/Mida/modeler.html, its source code is available here https://bitbucket.org/proslabteam/mida/src/2.1.0/