Book a Demo

Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.

Prev Next


A UML State element used in UML StateMachine diagrams modeled using Sparx Systems Enterprise Architect.


A State represents a situation where some invariant condition holds; this condition can be static (waiting for an event) or dynamic (performing a set of activities). State modeling is usually related to Classes, and describes the enable-able states a Class or element can be in and the transitions that enable the element to move there. There are two types of State: Simple States and Composite States, both created from the 'State' icon from the Toolbox.

Furthermore, there are pseudostates, resembling some aspect of a State but with a pre-defined implication. Pseudostates model complex transitional paths, and classify common StateMachine behavior.

You can define entry, internal and exit actions for a State using operations.  State elements can have three operations (entry, do and exit) that are created and defined through the 'Behavior' tab of the Features window (Start > Desktop > Design > Features). The tab displays only when the selected element is a State. It automatically lists the three operations, and you can either type a text value in the 'Name/Comment' field, or assign a behavior element of code using the 'Behavior' page of the  Properties window (see the Operation Behavior Help topic).

If a State element has features such as operations, internal triggers or inherited operations and attributes, the depiction of the element in a diagram has a line under the element name. This line persists if the features are hidden. The line also displays if the 'Show State Compartment' checkbox is selected on the 'Objects' page of the 'Preferences' dialog (select the 'Start > Desktop > Preferences > Preferences' ribbon option and the 'Objects' page).

An alternate notation for UML State elements.

Toolbox icon

State element

Learn more

OMG UML Specification:

The OMG UML specification (UML Superstructure Specification, v2.1.1, p.546) states:

A state models a situation during which some (usually implicit) invariant condition holds. The invariant may represent a static situation such as an object waiting for some external event to occur. However, it can also model dynamic conditions such as the process of performing some activity (i.e. the model element under consideration enters the state when the activity commences and leaves it as soon as the activity is completed).