pm4py / pm4py-core

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

Getting a False soundness result for the simplest BPMN model #484

Closed DigitalGabriele closed 6 months ago

DigitalGabriele commented 6 months ago

I am running a soundness check on a simple BPMN model, by running the following code:

import pm4py
bpmn_path = "diagram_5.bpmn"
net, initial_marking, final_marking = pm4py.read_pnml(bpmn_path)
is_sound = pm4py.check_soundness(net, initial_marking, final_marking)

The printed result for is_sound:

(False,
 {<Outputs.DIAGNOSTIC_MESSAGES: 'diagnostic_messages'>: ['There is more than one initial or final marking.']})

The BPMN looks like:

Screenshot 2024-05-04 at 12 55 25

What am I doing wrong?

fit-alessandro-berti commented 6 months ago

Dear @DigitalGabriele

You should read the BPMN using pm4py.read_bpmn and convert it later to Petri net using pm4py.convert_to_petri_net

DigitalGabriele commented 6 months ago

Thanks!