How to replace a DataObject element

Hey @ThePasko,

I figured out, what the problem is. It is not sufficient to just create the data object, it also has to be added to a parent, if it should be included in the XML. I added a test case in bpmn-moddle to demonstrate that case:

If you want undo/redo support in addition, you also have to take care of this yourself. To find out how that is done, check this post: Update custom BPMN meta data so it can be undone via CTRL+Z

Hope that helps :slightly_smiling: