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

State Invariant

A State Invariant is a condition applied to a Lifeline, which must be fulfilled for the Lifeline to exist. You create a State Invariant by dragging the State/Continuation element onto the diagram from the Interaction Elements page of the Toolbox.

This diagram illustrates a State Invariant.

A UML Sequence diagram showing a State/Continuation element used as a State Invariant.

When a State Invariant is moved near to a Lifeline, it snaps to the center. If the sequence object is dragged left or right, the State Invariant moves with it.

Learn more

OMG UML Specification:

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

A StateInvariant is a runtime constraint on the participants of the interaction. It may be used to specify a variety of different kinds of constraints, such as values of attributes or variables, internal or external states, and so on.

A StateInvariant is an InteractionFragment and it is placed on a Lifeline.