Plain-English guides to workflow automation, process management and open-source tools

Petri Nets and Workflow Modeling: An Introduction

petri nets workflow

Wondering how petri nets workflow modeling works? A Petri net draws a process as places, transitions and tokens, so every step has exact, checkable rules for when it can run.

This guide sits within business process management, and explains the core ideas in plain language.

Item Value
Origin Carl Adam Petri’s 1962 dissertation
Element types Two: places and transitions
A transition is enabled when Every input place holds at least one token
Workflow nets A subclass of Petri nets for process activities
Soundness A start token in the source place can always reach the sink place

These figures come from the Wikipedia article on Petri nets. Definitions and details can change, so check the source before you rely on them.

What a Petri net is

A Petri net is a directed bipartite graph with two kinds of elements: places and transitions. Arcs connect a place to a transition or a transition to a place, never two of the same kind.

The idea is named after the German computer scientist Carl Adam Petri, who analyzed these nets extensively in his 1962 dissertation. Since then the notation has been used well beyond computer science, including for business processes.

In everyday terms, the pieces map to a process like this:

  • Places (circles) describe conditions or states, such as “order received” or “invoice paid”.
  • Transitions (boxes or bars) describe activities or events, such as “check stock”.
  • Arcs (arrows) show which places feed a transition and which places it fills.
  • Tokens (dots) sit in places and represent cases, items or resources moving through the process.

How tokens make a process run

The behavior of a net is defined by one rule. A transition is enabled if all places connected to it as inputs contain at least one token.

When an enabled transition fires, it consumes the required input tokens and creates tokens in its output places. The spread of tokens across the places at any moment is called the marking, and it describes the current state of the whole process.

Imagine a simple order process. A token in “order received” enables “check stock”. Firing it removes that token and places a new one in “stock checked”, which in turn enables the next step.

Modeling choice, parallel work and loops

Real processes rarely run in a straight line. Petri nets offer a graphical notation for stepwise processes that include choice, iteration and concurrent execution, as the Wikipedia article on Petri nets describes.

Each of these has a recognizable shape:

  • Sequence: a place between two transitions forces the second to wait for the first.
  • Choice: one place feeds two transitions. Only one of them can take the token.
  • Parallel work: one transition outputs tokens to two places, so two branches run at the same time.
  • Synchronization: one transition needs tokens from two places, so it waits until both branches have finished.
  • Loop: an arc returns a token to an earlier place, so a step such as a review can repeat.
petri nets workflow directional arrows
Wooden arrows form an upward path with a branch pointing right on a peach background.

When several transitions are enabled at once, execution is nondeterministic unless an execution policy is defined. They may fire in any order, which is why Petri nets suit concurrent behavior so well.

Workflow nets: Petri nets shaped for business processes

Workflow nets (WF-nets) are a subclass of Petri nets intended to model the workflow of process activities. Transitions stand for tasks, and the net has a clear start and a clear end.

A WF-net has one source place where each case begins, and one sink place where it finishes. A new case is simply a token placed in the source place.

This structure makes a net easier to read and to analyze. It also matches how people think about a case: it starts, passes through tasks, and ends.

Reading a small example step by step

Take a simple expense claim. A token starts in the source place, labeled “claim submitted”. The first transition, “review claim”, consumes it and produces a token in a place called “claim reviewed”.

From there the net can split into two parallel branches: one transition checks the receipts while another checks the budget code. Each branch puts a token in its own place, and the next transition, “approve payment”, needs both. Until both tokens arrive, it stays disabled.

Walking through a model this way is a useful habit. Follow these steps:

  1. Put one token in the source place.
  2. Find every transition whose input places all hold a token.
  3. Fire one of them and redraw the marking.
  4. Repeat until a token reaches the sink place, or until nothing can fire.

If you reach a point where nothing can fire and the sink place is still empty, you have found a design error. Catching it on paper is far cheaper than catching it in a live process.

Why soundness matters

The most useful check on a workflow net is soundness. WF-nets have the soundness property, meaning a process with a start marking in its source place can reach the termination state marking in its sink place.

In practice, a sound process has no deadlocks that leave a case stuck halfway. It also leaves no stray work behind once a case has finished.

Unlike many popular notations, Petri nets have an exact mathematical definition of their execution semantics, according to the same Wikipedia article. That is what allows tools to test soundness automatically instead of leaving it to a reviewer’s eye.

Common mistakes when drawing a net

Beginners tend to make the same few errors. Knowing them saves time when you review your own models.

  • Linking two places directly. Arcs must always pass through a transition, so add a step between them.
  • Forgetting the synchronization. After a parallel split, a later step that needs both branches must have an input from each one.
  • Leaving a branch open. A path that never reaches the sink place leaves cases stuck.
  • Mixing up conditions and activities. Places hold states; transitions do the work. Naming them in the right style keeps the diagram readable.

Most of these show up quickly when you play the token game described above. A tool that checks soundness will flag the rest.

Where Petri nets fit in the wider process toolkit

Petri nets are one of several notations for the same job. Others include UML activity diagrams, Business Process Model and Notation and event-driven process chains.

The main difference is rigor. Diagram-first notations are often easier for business users to read, while Petri nets give a precise foundation underneath.

If you are mapping where modeling sits in the process improvement cycle, the bpm lifecycle shows where design and analysis happen. For tools that execute models, see the overview of business process management software.

Frequently asked questions

Who invented Petri nets?

They are named after the German computer scientist Carl Adam Petri, who analyzed them extensively in his 1962 dissertation.

What is a token in a Petri net?

A token marks that a condition holds in a place. It can represent a case, an item or a resource, and transitions consume and create tokens as they fire.

What is a workflow net?

It is a subclass of Petri nets intended to model the workflow of process activities, with a source place where cases start and a sink place where they end.

What does soundness mean?

A sound workflow net can always move a case from the source place to the sink place. It is the basic correctness test for a process model.