I am sending the XML generated by bpmn io to server through ajax call where certain modifications are done in XML (changing ID). I am getting the XML back to client side and I need to render the changed XML to modeller.
I have integrated the “dist” folder generated after grunt build to my web application. Please suggest where the changes are required in the code to render the changed XML
How to use the XML sent back by server to drag and drop more elements. I should retain the changes sent back from server and then append the dragged elements to the next XML generated ?
As one way - you should re-import new XML every time server sends an updated version:
Or… create some sort of sync between client custom bpmn-js module that would understand server side amendments. This would be most of the work, but should allow to keep history.
var BpmnModeler = require('bpmn-js/lib/Modeler');
var canvas = document.querySelector('#canvas');
// Create new Modeler
var modeler = new BpmnModeler({
container: canvas,
keyboard: { bindTo: document }
});
There is no limit to what you can do with it . It really depends on what you are looking for.
Check out this diffing project. Together with something like overlays or element colors it should be doable.