UML Diagrams
Sequence Diagram
O/R Mapping
Mac OS X
Tips and Tricks
VP Suite
Change Log

Editing the Combined Fragment in Sequence Diagram

A combined fragment is used to specify an area of a group of lifelines/actors to show conditional flow in a sequence diagram. This combined fragment notation is a new notation in UML 2.0 which will be used to handle the functionality problems, for some logic that is required for a sequence diagram that UML 1.x could not handle.

Creating Combined Fragments

  1. Create a sequence diagram by any of these 3 methods listed below.
    Method 1- Creating a sequence diagram from the menu bar:
    edit_combined_fragment-1.jpg

    On the menu, select File > New Diagram > UML Diagrams > Sequence Diagram. A new sequence diagram will be created.

    Method 2 – Creating a sequence diagram from the toolbar:
    Click on the New Sequence Diagram button edit_combined_fragment-2.jpg from the toolbar. A new sequence diagram will be created.
    edit_combined_fragment-3.jpg

    Method 3 – Creating a sequence diagram from the Diagram Navigator:
    1. Right click on the Sequence Diagram from the Diagram Navigator on the left side.
    2. Click on the Create Sequence Diagram from the pop-up menu. A new sequence diagram will be created.
      edit_combined_fragment-4.jpg

  2. Draw two lifelines by choosing the LifeLine icon on the diagram palette then clicking anywhere on the diagram. Rename the lifelines by double-clicking on the newly created lifelines (For example Check Balance and Checking Account lifelines).
    edit_combined_fragment-5.jpg

  3. Create a message between the two lifelines by selecting the Message icon on the diagram palette, clicking on the Check Balance lifelines and then dragging to the Checking Account lifelines. Rename the message as Get Balance by double-clicking on the message.
    edit_combined_fragment-6.jpg

  4. Create a combined fragment.
    Method 1:
    1. Select a combined fragment icon (Alternative Combined Fragment or Loop Combined Fragment) in the diagram palette (For example, Alternative Combined Fragment is chosen)
      edit_combined_fragment-7.jpg

    2. Select the lifelines/actors to be covered by ticking the check box of available lifelines from the Add/Remove Covered LifeLines dialog box.
      edit_combined_fragment-8.jpg

      OR resize the combined fragment to cover the desired lifelines/actors (the lifelines / actors added to coverage will be blinking to green).
      edit_combined_fragment-9.jpg

      Method 2:
      Right click on the diagram and use mouse gesture (right-down-left-up for Loop Combined Fragment and right-down-left-up-right for Alternative Combined Fragment) to surround the desired lifelines/actors and/or the messages.
      edit_combined_fragment-10.jpg

      edit_combined_fragment-11.jpg

Method 3:
Select two or more lifelines/actors and click on the Create Combined Fragment for Selected LifeLines resource.
edit_combined_fragment-12.jpg

Adding/Removing Covered LifeLines

Method 1:
Resize the combined fragment to cover the desired lifelines/actors.
edit_combined_fragment-13.jpg

Method 2:
Right-click on the combined fragment and select Add/Remove Covered LifeLines... from the pop-up menu. You can add/remove the covered lifeline by selecting or deselecting the check box of available lifelines from the Add/Remove Covered LifeLines dialog box.

Note: The combined fragment will cover the selected lifelines on the Add/Remove Covered LifeLines dialog box.
edit_combined_fragment-14.jpg

Changing Combined Fragment’s Type (operator)

Method 1:
Right-click on the combined fragment, select Operator from the pop-up menu and select a type from the Operator submenu.(For example alt operator is selected).
edit_combined_fragment-15.jpg

Method 2:

  1. Right-click on the combined fragment, select Open Specification... from the pop-up menu. A Combined Fragment Specification dialog box is displayed.
  2. On the General tab, select a type from the drop down menu of the Interaction operator attribute.(For example alt operator is selected.)
    edit_combined_fragment-16.jpg

Resizing an Operand

Mouse over on the separator between operands (the dashed line), click and drag to resize the operand.
edit_combined_fragment-17.jpg

Adding Operands

Method 1:
Right-click on the combined fragment and select Add Operand from the pop-up menu.
edit_combined_fragment-18.jpg

Method 2:

  1. Right-click on the combined fragment and select Manage Operands... from the pop-up menu. A Manage Operands dialog box is displayed.
    edit_combined_fragment-19.jpg

  2. Click on the Add button on the Manage Operands dialog box to add a new Operand. Edit the Operand properties as needed.
    edit_combined_fragment-20.jpg

  3. Click on the Apply button to confirm the changes. Click OK to close the Manage Operands dialog box.
    edit_combined_fragment-21.jpg

Removing Operands

Method 1:
Right click on the combined fragment and select Remove Operand from the pop-up menu, then select the operand to be deleted from the submenu.
edit_combined_fragment-22.jpg

Method 2:

  1. Right-click on the combined fragment and select Manage Operands... from the pop-up menu. A Manage Operands dialog box is displayed.
    edit_combined_fragment-23.jpg

  2. Select the operand you want to delete from the list of Operands.
    edit_combined_fragment-24.jpg

  3. Click on the Remove button on the left of the dialog box to remove the selected operand and click Yes on the Confirm Remove pop-up message.
    edit_combined_fragment-25.jpg

  4. Click on the Apply button to create the changes. Click OK to close the Manage Operands dialog box.
    edit_combined_fragment-26.jpg

Editing Operand’s Guard Condition (and other properties)

  1. Right-click on the combined fragment, select Open Specification… from the pop-up menu. A Combined Fragment Specification dialog box is displayed.
    edit_combined_fragment-27.jpg

  2. Select the Interaction Operands tab, select the desired operand and click Open Specification… button. An Interaction Operand Specification dialog box is displayed.
    edit_combined_fragment-28.jpg

  3. Select the Guard tab and edit the desired properties. You can also edit other properties by choosing any of the tabs available in the dialog box. Click on the Apply button to confirm the changes. For example you can put Have more than 1 checking account constraint for the guard properties of the selected interaction operand.
    edit_combined_fragment-29.jpg

Related Articles

Resources

 
 
Last modified: 2006/01/09 17:07
 
 
Home | Recent Topics | Highlights | UML Diagrams | Tips and Tricks | Object-Relational Mapping
visual-paradigm.com Home | Training Center | UML Center | VP Gallery | Discussion Forum | UML Open Directory