Architecting and designing > UML 2.5 > Diagram views > Sequence diagram > State Invariant on Sequence diagram
  
State Invariant on Sequence diagram
A State Invariant is an Interaction Fragment which represents a runtime constraint on the participants of the interaction.
A State Invariant can be used to specify different kinds of constraints, such as values of attributes or variables of the object when it is in that state, whether the object is in a particular state, the value of external states, and so on.
The constraint is evaluated immediately prior to the execution of the next occurrence specification such that all actions that are not explicitly modeled have been executed. If the constraint is true, the trace is a valid trace, otherwise the trace is an invalid trace.
A graphic depicting State Invariant on Sequence diagram
Note The ExecutionSpecification (otherwise referred to as a ‘Focus of Control’) rectangular line is designed to show itself above all other symbols on a Sequence diagram.
How to place a State Invariant symbol over an ExecutionSpecification rectangle
If you want to place a State Invariant symbol over an ExecutionSpecification rectangle (as in the image above), you can complete the following steps:
1 Select the StateInvariant symbol (or any symbol on the Sequence diagram).
2 Select Format > Diagram Format > Symbol Display Layering, and then change the choice from By Size and Transparency (Default) to User Control.
3 Select the StateInvariant symbol, and then select Format > Symbol Layering > Bring to the Front.
See also
Lifelines on Sequence diagram
Messages on Sequence diagram
Generic Line on Sequence diagram
GeneralOrdering on Sequence diagram
Combined fragment on Sequence diagram
ConsiderIgnoreFragment on Sequence diagram
Constraints on Sequence diagram
Coregions on Sequence diagram
ExecutionSpecification on Sequence diagram
Interaction on Sequence diagram
InteractionOperand on Sequence diagram
InteractionUse on Sequence diagram
Observation on Sequence diagram
Go up to
Sequence diagram