BPMN JS Modeler Jumbles the Order of elements in the Initially Loaded XML after rendering the diagram



We have implemented the BPMN web modeler within our react application. What we do is, design a model and save the generated bpmn xml to our own oracle table as a BLOB. Then we load this same BLOB(xml) from database to the Modeler again for the first time. It loads the previously designed diagram correctly(logically the same diagram that we have defined previously). But if we checkout/download the currently loaded digram as a XML ( using saveXML method ), it returns a XML which is jumbled/ordering of some elements has been changed. it is still logically the same one we modeled, but some of the elements ordering has been changed/jumbled.

Do you have any clue on this? Any idea about why this has happened?
Seems like this happens after rendering the loaded XML.

Hi @Nimesha_Jinarajadasa , welcome!

It might be the case that the XML parsing tools we use under the hood are doing some reordering, especially when it’s needed from the BPMN 2.0 standard perspective.

Can you maybe share a comparison of the XML before and after the automatic changes? Therefore we can check whether it’s intended or not.

Hi @Niklas_Kiefer


This is the diff.