We can use combined fragments to model various control structures.

There are three categories of types of fragments:
- Branches and loops: alt, opt, loop, break
- Concurrency and order: seq, strict, par, critical
- Filters and assertions: ignore, consider, assert, neg
The types of fragments are:
Alt Fragment (UML Sequence)
alt: to model alternative sequences, similar to a switch case.
- Guards are used to select the one path to be executed.
They are modelled in square brackets. We may use
[else]to signify any other case if other guards fail. - Guards must be disjoint to avoid in deterministic behaviour.
Link to original
- Guards are used to select the one path to be executed.
They are modelled in square brackets. We may use
Opt Fragment (UML Sequence)
opt: to model optional sequence actual execution at runtime is dependent on the guard.
- Exactly one operand.
- Similar to
ifwithoutelsebranch. - Equivalent to Alt Fragment (UML Sequence) with two operands where one is empty.
Link to original
Loop Fragment (UML Sequence)
loop: to express that a sequence is to be executed repeatedly.
- Exactly one operand.
- Keyword is followed by minimal / maximal number of iterations.
(min..max)or(min, max)Examples of equivalent notation:loop(3,8) = loop(3..8)loop(8,8) = loop(8)loop = loop(*) = loop(0, *)
- Guard is evaluated as soon as the minimum number of iterations has taken place, then checked also for each iteration within the limits. If the guard evaluates to false, the execution of the loop is terminated.
Link to original
Break Fragment (UML Sequence)
break: simple form of exception handling.
- Exactly one operand with a guard.
- If the guard is true:
- Interactions within the operand are executed.
- Remaining operations of surrounding fragment are omitted.
- Interaction continues in next higher lever fragment.
Link to original
Strict Fragment (UML Sequence)
strict: sequential interaction with order
- Order of event occurrences on different lifelines between different operands is significant.
- Messages in an operand that is higher up on the vertical axis are always exchanged before the messages in an operand that is lower down on the vertical axis.
Link to original
In addition, we may apply:
Coregion (UML Sequence)
A coregion is used to model concurrent events of a single lifeline.
- The order of event occurrences within a coregion is not restricted.
- Area of the lifeline to be covered by the coregion is marked by square brackets rotated by 90 degrees.
Link to original
Interaction Reference (UML Sequence)
An interaction reference integrates one sequence diagram into another.
Link to original
Gate (UML Sequence)
A gate allows you to send and receive messages beyond the boundaries of the interaction fragment.
Link to original
Time Constraints (UML Sequence)
We may specify time constraints such as:
- The point in time for event occurrence.
- Relative:
after(5sec) - Absolute:
at(12.00)
- Relative:
- Time period between two events:
{lower..upper}
Link to original
- The point in time for event occurrence.