Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

id373098376

...

id373098378

...

id373098377
Excerpt

A lifeline represents an individual participant in the Interaction. The lifeline represents only one interacting entity, symbolized by a rectangle.

The

...

following steps show

...

you how to work with a lifeline:

Table of Contents

Assigning a type to a lifeline

To assign a type (classifier) to a lifeline, do one of the following:


  • In the lifeline Specification window, in the Type property value, click the ... button, and in the open dialog, select the type. When you are finished, click OK.
  • On the diagram, from the lifeline shortcut menu, select Type. In the open list, select the type.
  • On the diagram, click a lifeline, and then, on the smart manipulator toolbar, click Image Modified. In the open list, select the type.
  • On the diagram, click a lifeline, and then press Ctrl+T. In the open list, select the type.
  • On the diagram, select a lifeline, and in the name area, type the “:” and the name of the type. Press Enter or click anywhere on the diagram. The type is created and assigned.

    Info

    Type the “:”, press Ctrl+Space, or Ctrl+Backspace. In the open list, select the type.

  • In the Containment tree, select an element and drag it to the lifeline shape.

Showing/hiding a base classifier

To hide/show a base classifier


  • On the diagram, right-click the lifeline. From the shortcut menu, select the Show Classifier check box.

Displaying lifelines

You can display lifelines on the Sequence or Communication diagram in the following ways:

  • By manually dragging lifeline elements from the Containment tree.
  • By automatically using the Display Lifelines dialog.

There are two situations in which you can use the Display Lifelines dialog to automatically display lifelines:


Anchor
new
new
To display lifelines when creating a new diagram


  1. When creating a new Sequence or Communication diagram for an existing classifier, the Display Lifelines dialog opens automatically.

...


  1. Image Added

  2. In the opened Display Lifelines dialog, select the lifelines you want to display, and click OK.
    Selected lifelines are displayed on the diagram pane.


Anchor
modify
modify
To display lifelines in a preexisting diagram


  1. Select the diagram pane.
  2. Open the Display Lifelines dialog by performing one of the following steps:
    • From the diagram shortcut menu, select Display > Display Lifelines.

      Image Added

    • On the diagram toolbar, click DisplayImage Modified and select Display Lifelines.

...



  1. In the dialog, select the lifelines you want to display, and click OK.
    Selected lifelines are displayed on the diagram pane.

    Displayed lifelines on the Order Ticket Sequence diagram pane.Image Modified

Deeply nested parts

The “dot notation” is available for the lifelines. Now you can send messages directly to the deeply nested parts.

To display a deeply nested part


  1. Create a Sequence diagram. The Display Lifelines dialog opens.

    Tip

    You can open the Display Lifelines dialog in the existing diagram. On the diagram pane, click the right mouse button and from the shortcut menu, select Related Elements > Display Lifelines.

  2. Select a nested part you want to display.

    Note

    Make sure that the nesting part is not selected, otherwise it will be displayed instead of the nested part.

...

id373098375

Related pages

...

Image Added

Activation bars on lifelines

By default, when there is a message sent between lifelines in a sequence diagram, the lifelines are displayed with activation bars on them. However, you can hide the activation bars from the diagram.

To hide activation bars from lifelines in a sequence diagram


  1. Right-click on the diagram pane. From the shortcut menu, select Diagram properties.
  2. The Diagram properties of Sequence Diagram dialog opens. Deselect Show Activations check box, setting the value from true to false.

...


  1. Image Added

Sample model

The models used in the figures of this page is the Communication diagram and Sequence diagram sample models.

...

To open these samples

...


  • Find in modeling tool:
       - <modeling tool installation directory>\samples\diagrams\communication diagram.mdzip.
       - <modeling tool installation directory>\samples\diagrams\sequence diagram.mdzip.