pm4py / pm4py-core

Public repository for the PM4Py (Process Mining for Python) project.
https://pm4py.fit.fraunhofer.de
GNU General Public License v3.0
722 stars 286 forks source link

sequence of entries in </bpmndi:BPMNDiagram> #350

Closed excubo-jg closed 2 years ago

excubo-jg commented 2 years ago

I am parsing the bpmn output from pm4py. While the graphs generated with view_bpmn() look the same, the sequence of the object information in the .bpmn file generated by objects.bpmn.exporter does not stay the same.

Run 1: </bpmndi:BPMNDiagram>

id1dafc423-b126-460d-a0e4-a4b4f0c19839 idf8f665f5-9e5a-4fbc-a8d3-ae474b58205e id4980ba50-a459-4614-a295-86dc64617188 ... where as Run 2 of the same input file: id0f2e963d-3684-4092-b214-868a556374c8 id127e2aee-a3a6-45fe-9644-d26095ddb7d3 id5842aa7a-b550-4d55-8f37-d376c97176df id370a9de0-e669-49a7-8020-8a7526ce95bb ideb335bdc-d14e-4b76-8ea0-920bf9c9112b ... Is this expected behavior? It would be easier to compare different runs if the objects were written in the same sequence in the .bpmn-file. Actually, I was surprised to see that they are not. I'd expect the file to look the same as the input file and the processing did not change.
fit-alessandro-berti commented 2 years ago

Dear @excubo-jg the order of the elements in the BPMN does not affect other tools (Camunda, BPMN.JS). Due to the nature of the conversion Petri net -> BPMN we could not ensure the same ordering in all the executions (e.g. there is non-determinism involved). Also the labels are going to be generated as unique identifiers in every execution

excubo-jg commented 2 years ago

ok, many thanks for the explanation. I am using the name= tokens for matching so I am not impacted by the unique identifiers