Adding guard conditions to sequence diagrams

In sequence diagrams, a guard condition contains an interaction constraint. An interaction constraint is a condition or restriction. A guard condition is created automatically when you create a combined fragment. You can also manually add a guard condition to an interaction operand that does not have an existing guard condition.

Before you begin

You must have a sequence diagram open that contains at least one combined fragment with multiple lifelines.

Procedure

  1. In the diagram editor, right-click an interaction operand that has no existing guard condition; then click Interaction Operand > Add a guard condition.
  2. Click in the field, type the guard condition, and press Enter.

What to do next

Note: In a loop combined fragment, you can edit the guard condition using the textual syntax [ ‘(‘ <minint> [, <maxint> ] ')' ], where minit and maxint are non-negative integers, and state the minimum and maximum number of times that a loop can occur.

Feedback