Skip to content

XrayNerd/PNML2EGSM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PNML2EGSM

CC BY 4.0

This tool is a result of a Master Thesis completed at the Technical University of Denmark, with the aim of providing a method of converting Petri Nets into E-GSM.

Usage/Examples

# Read in Petri Net and Workflow Tree files
petriNet, initial_marking, final_marking = pm4py.read_pnml("Location to PNML File")
wftree = parse_nodes("Location To WFTree Output")

# Convert to EGSM Object
out, infomodelxsd = Convert.convert_to_egsm(
    petriNet=petriNet,
    initial_marking=initial_marking,
    final_marking=final_marking,
    wftree=wftree,
)

# Save as XMI File
out_as_xmi = out.toElement()
etree.ElementTree(out_as_xmi).write(f"Temp XMI location")

# Convert into XML using XSL
dom = etree.parse("Temp XMI location")
xslt = etree.parse("PNML2EGSM/EGSM/utils/siena.xsl")
transform = etree.XSLT(xslt)
result = transform(dom)
result.write_output("Final EGSM Output")

Acknowledgements

License

This work is licensed under a Creative Commons Attribution 4.0 International License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published