# State Machine Diagram Modeling Mistakes

**In short:** State machine diagrams go wrong when start and end markers are misused, when completion transitions compete, or when guards overlap. Knowing these errors helps you build models with one clear behavior.

## Explanation

A state machine diagram shows the states an object can be in and the transitions between them (see State Machine Diagram and State Machine Transition). Most mistakes fall into a few groups.

**Initial and final markers**

- An initial pseudostate is the starting marker. It is the source of a single transition to the default state. Do not draw several outgoing arrows from it.
- A final state means the enclosing region is completed. Use it when the behavior is meant to end.

**Completion transitions**

- A completion transition has no explicit trigger. An implicit completion event fires it.
- Completion events are dispatched ahead of other pooled events. An unguarded completion loop could therefore starve other events.
- If one state has several completion transitions, give them mutually exclusive guards. Otherwise the choice is ambiguous.

**Guards and the else branch**

- A guard is a condition on a transition. Guards leaving one source should not overlap.
- The else transition is enabled only when all other guards from the same source are false. It covers the remaining cases.

**Entry and exit points**

- Entry and exit point pseudostates belong to a state machine or a composite state. Do not place them on a simple state.
- A composite state contains other states (see Composite State).

**Transition kinds**

- UML defines three transition kinds: external, internal and local. Choose the kind on purpose.

## Example

A "Payment" object leaves the "Checking" state through two completion transitions. One has the guard [amount <= limit] and goes to "Approved". The other has the guard [amount >= limit] and goes to "Declined". At exactly the limit, both guards are true, so the choice is ambiguous. The fix is to make the guards disjoint: keep [amount <= limit] and mark the second transition [else]. The else transition then fires only when the first guard is false.

Disjoint guards with an else branch leave one clear choice.

```plantuml
@startuml
[*] --> Checking
Checking --> Approved : [amount <= limit]
Checking --> Declined : [else]
Approved --> [*]
Declined --> [*]
@enduml
```

## Checks

- Each region has an initial pseudostate with a single transition to the default state.
- Completion transitions leaving the same state have mutually exclusive guards.
- Where an else transition is used, it is the fallback for a source whose other guards can all be false.
- Entry and exit points appear only on a state machine or a composite state.
- A final state is used where a region is meant to complete.

## Related

- [State Machine Diagram](https://arc.fuet.ch/concepts/modeling-uml/state-machine-diagram.md)
- [State Machine Transition](https://arc.fuet.ch/concepts/modeling-uml/state-machine-transition.md)
- [Transition Syntax (Trigger, Guard, Behavior)](https://arc.fuet.ch/concepts/modeling-uml/transition-syntax.md)
- [Composite State](https://arc.fuet.ch/concepts/modeling-uml/composite-state.md)
- [Concurrent Region](https://arc.fuet.ch/concepts/modeling-uml/concurrent-region.md)
- [State and Event](https://arc.fuet.ch/concepts/modeling-uml/state-and-event.md)
- [State Entry, Exit and Do Behavior](https://arc.fuet.ch/concepts/modeling-uml/state-entry-exit-and-do-behavior.md)
- [UML Modeling Anti-Pattern](https://arc.fuet.ch/concepts/modeling-uml/uml-modeling-anti-patterns.md)

## Sources

- [](https://site.uottawa.ca/~tcl/gradtheses/mnojoumian/ThesisFiles/FinalSpec/UML/15.3.14.html) — site.uottawa.ca, accessed 2026-11-09
- [State Machine Diagram - UML Diagrams - Unified Modeling Language Tool](https://www.visual-paradigm.com/VPGallery/diagrams/State.html) — visual-paradigm.com, accessed 2026-11-09
