1 \documentclass[tikz
]{standalone
}
3 \usetikzlibrary{automata,positioning
}
6 \begin{tikzpicture
}[->,shorten >=
1pt,node distance=
3cm,auto
]
7 \node[state
] (off)
{off
};
8 \node[state
] (inact)
[right=of off,xshift=-
0.5cm
] {inactive
};
9 \node[state
] (act)
[below=of inact,yshift=
2cm
] {active
};
10 \node[state
] (back)
[right=of inact
] {stopped
};
12 (off) edge
[below
] node
{on
\_create} (inact)
13 (inact) edge
[left
] node
{on
\_resume} (act)
14 edge
[below
] node
{on
\_stop} (back)
15 (back) edge
[above
] node
{on
\_restart} (inact)
16 edge
[bend right=
20] node
{} (off)
17 (act) edge
[right
] node
{on
\_pause} (inact);