How to Use Alt Fragment

Alt is very a frequently used operator of fragment. It divides the fragment into partitions and for each one defines a condition (guard) which must be true for the executed partition.

If you want to insert an Alt Fragment to your diagram in Software Ideas Modeler, you can do it this way:

Choose Alt Fragment Tool

Choose the Alt Fragment tool from toolbox. Alt Fragment - Step 1

Insert Alt Fragment

Draw the Alt fragment - click (and hold) on the position where you want to be the top left corner of the fragment and move to the right bottom corner of your fragment. Alt Fragment - Step 2

Add Interaction Operand

Click on Add Interaction Operand button in the context bar below the fragment. If you want to add two operands, click twice (of course, you can click as many times as you want). Alt Fragment - Step 3

Adjust Positions

Move the mouse cursor to the dash line between interaction operands, press the left mouse button and drag the line to the desired position. Alt Fragment - Step 4

Set Guard Condition

Double click on interaction operand and Properties dialog will show. Then open the Interaction Operand tab, where you can set the guard condition for the interaction operand.

Alt Fragment - Step 5 Alt Fragment - Step 6

Add Alternative Call

Using Send Action Tool (or any action tool you want) add the alternative message to the second interaction operand. Alt Fragment - Step 7

New Comment

Comment