VISUAL SYNTAX

State Machine Notation

Essential notation for modeling system states, transitions, and event-driven behavior.

Simple State

Structure
ActiveState

Represents a condition or situation in the life of an object. Depicted as a rectangle with rounded corners.

Initial State

Structure
Idle

The starting point of the state machine pseudo-state. Represented by a solid filled circle.

Final State

Structure
Process

The end of the process flow. Represented by a circle with a solid dot inside (bullseye).

Transition

Behavior
State AState B

Movement from one state to another, triggered by an event. Depicted as a solid arrow.

Event / Trigger

Behavior
MouseClick

The signal that causes a transition. Written on the arrow line (e.g., 'Button Click').

Guard Condition

Logic
[isEmpty]

A boolean condition that must be true for the transition to occur. Written in brackets: [isValid].

Internal Actions

Behavior
Processingentry / startTimer()do / checkData()exit / logEnd()

Activities inside a state: 'entry/' (on entering), 'do/' (while inside), and 'exit/' (on leaving).

Choice (Decision)

Logic
[valid][invalid]

A dynamic branch point where the path is chosen based on guard conditions. Depicted as a diamond.

Self Transition

Behavior
WaitingRetry

A transition where the source and target states are the same. Useful for internal loops or refreshing.