Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

petrinet to bpmn #487

Closed
Dehghanpour1990 opened this issue May 15, 2024 · 4 comments
Closed

petrinet to bpmn #487

Dehghanpour1990 opened this issue May 15, 2024 · 4 comments

Comments

@Dehghanpour1990
Copy link

Hi, I have a code generating a Petri net as a dictionary. Now I want to convert it to a BPMN file and save it as .bpmn. How can I do it?

@fit-alessandro-berti
Copy link
Contributor

Dear @Dehghanpour1990

You can use the commands:

import pm4py

bpmn_graph = pm4py.convert_to_bpmn(net, initial_marking, final_marking)
pm4py.write_bpmn(bpmn_graph, "output.bpmn")

@Dehghanpour1990
Copy link
Author

Dear @fit-alessandro-berti,
Thank you for your reply. Your suggestion is for when we get a Petri_net from a discovery method using the PM4PY library right?
I have written a code generating Petri_net based on directly-follow-graph and want to convert it into a .bpmn file which will be used in another software.

@fit-alessandro-berti
Copy link
Contributor

Yes, any Petri net object in pm4py

@Dehghanpour1990
Copy link
Author

Dehghanpour1990 commented May 18, 2024

@fit-alessandro-berti
The problem is I have my code developing a discovery algorithm from scratch and the output is not a Petri net object in pm4py, just a Petri net as a dictionary. How can I convert this dictionary to a BPMN file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants