This glossary is an alphabetical guide to the most common terms in statecharts and state machines.
An action can be fired upon entry or exit of a state. Actions are “fire-and-forget processes”; once the machine has fired the action, it moves on and forgets the action. You can also fire actions on transitions.
When you run a statechart, it becomes an actor; a running process that can receive messages, send messages and change its behavior based on the messages it receives, which can cause effects outside of the actor.
See delayed transitions.
Delayed transitions are transitions that only happen after a specified interval of time. If another event happens before the end of the timer, the transition doesn’t complete. Delayed transitions are labeled “after” and often referred to as “after” transitions.
Eventless transitions are transitions without events. These transitions are always taken after any transition in their state is enabled. No event is necessary to trigger the transition. Eventless transitions are labeled “always” and often referred to as “always” transitions.
When a machine reaches the final state, it can no longer receive any events, and anything running inside it is canceled and cleaned up. A machine can have multiple final states or no final states.
A guard is a condition that the machine checks when it goes through an event. If the condition is true, the machine follows the transition to the next state. If the condition is false, the machine follows the rest of the conditions to the next state. Any transition can be a guarded transition.
A history state returns the parent state to its most recently active child state.
When a state machine starts, it enters the initial state first. A machine can only have one top-level initial state.
An invoked actor is an actor that can execute its own actions and communicate with the machine. These invoked actors are started in a state and stopped when the state is exited.
A parallel state is a state separated into multiple regions of child states, where each region is active simultaneously.
Parent and child states
States can contain more states, also known as child states. These child states are only active when the parent state is active. Child states are nested inside their parent states.
A state describes the status of the machine. A state can be as simple as active and inactive. These states are finite; the machine can only move through the pre-defined states. A state machine can only be in one state at a time.
Statecharts are a visual extension to state machines enabling you to model more complex logic, including hierarchy, concurrency, and communication.
A state machine is a model that describes how the state of a process transitions to another state when an event occurs. State machines make building reliable software easier because they prevent impossible states and undesired transitions.
Transitions and events
A machine moves from state to state through transitions. Transitions are caused by events; when an event happens, the machine transitions to the next state. Transitions are “deterministic”; each combination of state and event always points to the same next state.