pm4py.analysis.check_is_workflow_net#

pm4py.analysis.check_is_workflow_net(net: PetriNet) bool[source]#

Checks if the input Petri net satisfies the WF-net (Workflow net) conditions: 1. It has a unique source place. 2. It has a unique sink place. 3. Every node is on a path from the source to the sink.

Parameters:

net (PetriNet) – The Petri net to check.

Returns:

True if the Petri net is a WF-net, False otherwise.

Return type:

bool

import pm4py

net = pm4py.read_pnml('model.pnml')
is_wfnet = pm4py.check_is_workflow_net(net)