Closed jessevanmuijden closed 4 years ago
Hi @jessevanmuijden ,
You will have to use the zeebe-bpmn-moddle
which we use inside the ZeebeModeler
alongside bpmn-moddle
to handle Zeebe related diagrams.
var BpmnModdle = require('bpmn-moddle');
var zeebeModdle = require('./zeebe.json');
var moddle = new BpmnModdle({ zeebe: zeebeModdle });
/** do whatever you want **/
I'll close this since no actions seem to be needed. Please re-open if you follow-up in certain problems.
You could argue that a file inside the Zeebe Modeler is not the most ideal way to keep the Zeebe extensions around. Cf. https://github.com/camunda/camunda-bpmn-moddle.
Makes totally sense, e.g. for creating plugins in the future. I just created an issue for that: https://github.com/zeebe-io/zeebe-modeler/issues/107
I want to load the following BPMN file created with
Zeebe Modeler
, edit the definitions with Javascript and then save it back to XML:but I get the following error during
moddle.toXml(definitions)
:I also tried with
<bpmn2:definitions xmlns:bpmn2...``` from
README.md`, which resolves the error, but throws another error related to the ExtensionElement:If someone with more knowledge of moddle could point out what needs to be changed or added to support BPMNs created with Zeebe Modeler, I would be happy to make a PR.