Skip to content
Graphviz (DOT) templates

Graphviz — Petri Net

Workflow Petri net with places (circles) and transitions (bars).

Template previewGraphviz (DOT)
Petri p1 ● 1 t1 t1 request p1->t1 p2 t2 t2 approve p2->t2 p3 t3 t3 deliver p3->t3 p4 p5 ● 1 t1->p2 t2->p3 t2->p5 t3->p4

What this template contains

Graph
Directed
Edges
7
Source
16 lines

Make it your own.

digraph Petri {
  rankdir=LR;
  node [fontname="Inter"];
  p1 [shape=circle, label="● 1", width=0.6];
  p2 [shape=circle, label="",  width=0.6];
  p3 [shape=circle, label="",  width=0.6];
  p4 [shape=circle, label="",  width=0.6];
  p5 [shape=circle, label="● 1", width=0.6];
  t1 [shape=box, style="filled", fillcolor="#0f172a", fontcolor=white, label="t1\nrequest"];
  t2 [shape=box, style="filled", fillcolor="#0f172a", fontcolor=white, label="t2\napprove"];
  t3 [shape=box, style="filled", fillcolor="#0f172a", fontcolor=white, label="t3\ndeliver"];
  p1 -> t1 -> p2;
  p2 -> t2 -> p3;
  p3 -> t3 -> p4;
  t2 -> p5;
}