Working with a Combined Fragment - UML 2.0

From RAD Studio
Jump to: navigation, search

Go Up to Interaction Diagram Procedures

This topic explains how to work with a combined fragment.

To create a combined fragment:

  1. Choose the combined fragment button in the diagram Tool Palette, and click on the target lifeline.
  2. 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:

  1. Select the desired combined fragment.
  2. In the Operators field of the Object Inspector, click the chooser button. Edit Combined Fragment Operators dialog box opens.
  3. 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.
  4. Click Add button. A new line displays below the existing entry in the list of operators, and in the descriptor of the combined fragment.
  5. 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.
  6. 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:

  1. Select the desired combined fragment in the Model View or in the Diagram View.
  2. On the context menu of the combined fragment, choose Add > Interaction operand .
  3. 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.
  4. Type the constraint expression.
  5. Add as many operands as required.
  6. Apply changes.

Result: a new operand is created. Constraint text is displayed in the operand section of the combined fragment.

See Also