State Invariant

Return to Introduction  Previous page  Next page

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 Enterprise Architect UML Toolbox.

A State Invariant is illustrated below.

StateInvariant

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.

OMG UML Specification

The OMG UML specification (UML Superstructure Specification, v2.0, p. 433) states:

"A StateInvariant is a constraint on the state of a Lifeline. In this case we mean by "state" also the values of eventual attributes of the Lifeline.

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