Working with states and pseudostates

A state represents a distinct context for the behavior of an object. A state can be active or inactive during execution. A state becomes active when it is entered as a result of a transition, and becomes inactive if it is exited as a result of a transition. A state can be exited and entered as a result of the same transition (referred to as self-transition).

State

Description

composite state

A composite state is a state with one or more regions.

final state

Completion of a region.

simple state

A state that does not have regions or hierarchy. For clarity, it is referred to as a simple state.

submachine

A submachine contains nested states. The submachine lets you divide a complex start chart into subsystems.

A pseudostate refers to any element in the state chart that is not occupied for any duration. Pseudostates are typically used to connect transitions into more complex state transition paths.

Pseudostate

Description

choice

Splits transition into multiple paths

deep history

Represents the most recent active configuration of the composite state

entry point/exit point

Allow connections from a state to a submachine state

fork

Allows entry into multiple regions of a composite state

history

Represents the most recent active substate of its containing state

initial state indicator

Represents the source for a single transition

join

Exits multiple regions of a composite state

junction

Chains together multiple transitions

terminate

Causes the state chart to terminate all execution