pm4py.objects.conversion.bpmn.variants.to_petri_net module#
- class pm4py.objects.conversion.bpmn.variants.to_petri_net.Parameters(*values)[source]#
Bases:
Enum- USE_ID = 'use_id'#
- ENABLE_REDUCTION = 'enable_reduction'#
- RETURN_FLOW_TRANS_MAP = 'return_flow_trans_map'#
- pm4py.objects.conversion.bpmn.variants.to_petri_net.build_digraph_from_petri_net(net)[source]#
- Builds a directed graph from a Petri net
(for the purpose to add invisibles between inclusive gateways)
- Parameters:
net – Petri net
- Returns:
Digraph
- Return type:
digraph
- pm4py.objects.conversion.bpmn.variants.to_petri_net.apply(bpmn_graph, parameters=None)[source]#
Converts a BPMN graph to an accepting Petri net
- Parameters:
bpmn_graph – BPMN graph
parameters – Parameters of the algorithm: - Parameters.USE_ID => (default: False) uses the IDs of the objects instead of their labels in the conversion - Parameters.ENABLE_REDUCTION => reduces the invisible transitions - Parameters.RETURN_FLOW_TRANS_MAP => returns additional information on the conversion:
the places of the obtained Petri net that are corresponding to each
BPMN flow.
the transitions of the Petri net related to the nodes of the BPMN diagram.
- Returns:
net – Petri net
im – Initial marking
fm – Final marking