Architecting and designing > SysML > Diagram views > Sequence diagram > Constraints on Sequence diagram
  
Constraints on Sequence diagram
You can model Constraints of various types on a Sequence diagram, for both SysML and UML 2.5 support.
IntervalConstraint – a general purpose interval constraint – the interval described by a formula such as an equation, inequation or more generally a relation.
TimeConstraint – Time constraint is a constraint that refers to a time interval. The time interval is a time expression used to determine whether the constraint is satisfied.
DurationConstraint – Duration constraint is an interval constraint that refers to a duration interval. The duration interval is a duration used to determine whether the constraint is satisfied.
InteractionConstraint – represents groups of variables that are allowed to interact. Used as a Guard condition to specify whether an Interaction Operand runs in a Combined Fragment.
The Generic Line is used to model start and end regions of Constraints on a Sequence diagram for SysML and UML 2.5.
How to model a Constraint
To model a Constraint, complete the following steps – these steps use a DurationConstraint as an example:
1 Select the DurationConstraint symbol from the Draw toolbar, add it to the Sequence diagram, and then name it. The border of the Constraint symbol will disappear after drawing it.
First graphic of four depicting how to model a DurationConstraint
2 In the DurationConstraint definition, click the + mark for the Specification property on page 2 of the DurationConstraint tab to add a new DurationInterval (alternatively click the Choices button to drag-and-drop an existing DurationConstraint into the definition).
Second graphic of four depicting how to model a DurationConstraint
3 In the DurationInterval definition, click the + mark on the max property on the DurationInterval tab, to add a new maximum Duration (alternatively click the Choices button to drag-and-drop an existing DurationInterval into the definition).
Third graphic of four depicting how to model a DurationConstraint
4 On page 2 of the DurationInterval tab, add a minimum Duration by either clicking the + mark to add a new Duration, or clicking Choices and dragging-and-dropping an existing Duration into the property.
Fourth graphic of four depicting how to model a DurationConstraint
How to link the DurationConstraint to the Lifeline
1 Use the GenericLine to connect the Lifeline to the Constraint at the points where the Duration starts and ends. For the line:
Make sure its line style is set to Straight-Orthogonal (to access this setting, select the line, and then select Format > Symbol Format> Line Style).
Add additional end points into the line if necessary (right-click the line, and then select Insert Line Segment).
Make sure the arrowhead points at the Constraint (right-click the line, and select Associative to open the Associative Properties dialog, within which you can specify the direction of arrowheads).
A graphic depicting how to link the DurationConstraint to the Lifeline
2 Draw a similar Generic Line from the Lifeline to the bottom of the Constraint symbol.
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
Coregions on Sequence diagram
ExecutionSpecification on Sequence diagram
Interaction on Sequence diagram
InteractionOperand on Sequence diagram
InteractionUse on Sequence diagram
Observation on Sequence diagram
State Invariant on Sequence diagram
Go up to
Sequence diagram