Implementing Data Input and Data Output


#1

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?


#2

Hi Lorenzo

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.

Good luck.


#3

Hi Hadi,

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.


#4

Hi Lorenzo
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] :wink::wink::wink:


#5

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…