State-transitions diagrams#

State-transition diagrams are used to represent the behavior of a system, by showing the states of the system and the transitions between these states. In this chapter, you will see how to define states and transitions in a state-transition diagram.

Sub-states#

You can define a state in another state. Then, the coordinates of the sub-states are relative to the parent state:

\begin{umlstate}[name=state]{I am a state}
\begin{umlstate}[name=substate1]{I am a substate 1}

\end{umlstate}
\begin{umlstate}[x=3, y=-3, name=substate2]{I am a substate 2}

\end{umlstate}
\end{umlstate}

Figure made with TikZ

Figure made with TikZ