Refresh diagram from XML after first import


I am make some collabirative tool for online editing bpmn via bpmn-js. on initial load i use modeler.importXML… and it`s work well. But when i get new XML string via websocker i try try to use same method (importXML) i got error:

EventBus.js?ceb0:380 TypeError: Cannot read property ‘set’ of undefined
at orderDi (BpmnDiOrdering.js?ed35:33)
at invokeFunction (EventBus.js?ceb0:514)
at EventBus._invokeListener (EventBus.js?ceb0:365)
at EventBus._invokeListeners (EventBus.js?ceb0:350)
at (EventBus.js?ceb0:311)
at Modeler.BaseViewer._emit (BaseViewer.js?b392:533)
at Modeler.BaseViewer.saveXML (BaseViewer.js?b392:262)
at eval (TheDiagram.vue?dfc3:763)
at invokeFunction (EventBus.js?ceb0:514)
at EventBus._invokeListener (EventBus.js?ceb0:365)

is there any way to rerender only diagram with new xml? Like it works in cawemo

i have recurrsion over “shape.removed”, becouse i have enabled eventBus.on for that event, that triggered new websocket message. Everything is fine, sorry :slight_smile:

1 Like