Working with a Combined Fragment - UML 2.0
Go Up to Interaction Diagram Procedures
This topic explains how to work with a combined fragment.
To create a combined fragment:
- Choose the combined fragment button in the diagram Tool Palette, and click on the target lifeline.
- In the Type Chooser dialog box that opens, choose the desired operator from the list of available operators.
Alternatively, you can also create a combined fragment using the context menu of the Model View, or Diagram View.
To do this, choose the desired lifeline or execution specification in the Model View, or in the Diagram View. On the context menu of the selection, choose Add > Combined Fragment . This adds a combined fragment to the target location.
Result: the combined fragment is added to the target lifeline or execution specification. Each new combined fragment has different color, to tell it from the other combined fragments within the same cluster of nested frames.
To create a nested operator:
- Select the desired combined fragment.
- In the Operators field of the Object Inspector, click the chooser button. Edit Combined Fragment Operators dialog box opens.
- In the Edit operator combobox, select the desired operator. If a certain operator enables parameters, enter the parameter values in the adjacent field. Use commas as delimiters.
- Click Add button. A new line displays below the existing entry in the list of operators, and in the descriptor of the combined fragment.
- Use Add and Remove buttons to make up the desired list of the nested operators. Use Up and Down buttons to specify the proper order of nested operators.
- Click Done to apply changes.
Result: the nested operators are listed in the descriptor of the combined fragment in the specified order.
You can create the nested combined fragments by placing a new combined fragment node inside of an existing one. So doing, each new node is displayed in a different color. The colors are selected at random. You can work with the inner frames same way as with the outer frames: move along a lifeline, spread them over several lifelines, detach and tie frames. Note that drawing a message link from a frame automatically expands it, together with its outer frames, if any.
To create an operand:
- Select the desired combined fragment in the Model View or in the Diagram View.
- On the context menu of the combined fragment, choose Add > Interaction operand .
- In the Interaction constraint node select the language to be used for describing constraint. To do this, click the Language drop-down list and choose OCL or plain text.
- Type the constraint expression.
- Add as many operands as required.
- Apply changes.
Result: a new operand is created. Constraint text is displayed in the operand section of the combined fragment.