pm4py.convert.convert_to_powl#
- pm4py.convert.convert_to_powl(*args: Tuple[PetriNet, Marking, Marking] | BPMN | ProcessTree) POWL[source]#
Converts an input model to a POWL model.
The input models can be Petri nets (with markings) or BPMN models or process trees. For both input types, the conversion is not guaranteed to work and may raise an exception.
- Return type:
- Parameters:
args –
If converting from a Petri net: a tuple of (
PetriNet,Marking,Marking).If converting from a BPMN or ProcessTree: a single object of the respective type.
- Returns:
A
ProcessTreeobject.
import pm4py # Imports a BPMN file bpmn_graph = pm4py.read_bpmn("tests/input_data/running-example.bpmn") # Converts the BPMN to a POWL (through intermediate conversion to a Petri net) powl = pm4py.convert_to_powl(bpmn_graph) print(powl)