I have tried multiple ways to export the svg from the modeler to a bpmn xml, but unable to export. I tried following ways
modeler.moddle.toXML(modeler.get('canvas'), { format: true }, function (err, updatedXML) { console.log(updatedXML); });
modeler.saveXML({ format:true },function(err,output){ if(err){ console.log(err); } else{ console.log(output); } });
- It works on the browser console.cli.save('bpmn');
I always get these: undefined or no definitions loaded.
Please help.
Well,
The main problem was my thinking. As I come from a background of PHP type languages that are synchronous; so even though I read about the mean stacks asynchronous nature, I wasn't applying it.
Later I applied the same code and it worked.