As mentioned above, state machine diagrams aim to describe the behavior of a system as precisely as possible. Among other things, the visualization of individual processes is designed to answer the following questions:
- What happens when the object is in a specific state?
- What state has to occur for a change in its behavior?
- What are the triggering actions?
- Which properties does the object need to have to switch state?
UML state machine diagrams are used wherever it makes sense to visualize states and transition conditions for an optimized development process. They are especially popular for designing embedded systems, for example, since these systems handle various automated signals and processes in the background which need to be optimally coordinated. In this case, a state machine diagram supports developers by visualizing all relevant control and regulatory functions, making them obvious at a glance.
The benefits of state machine diagrams can be illustrated using the example of the washing machine function“Aqua Stop”. The function regulates the interruption of water supply to a washing machine. It can be understood as its own system as part of a UML state machine diagram. Here, the graphical representation shows in which state and under which conditions the “Aqua Stop” function takes effect.