Skip to main content

View definition for sequence diagram

Overview

Next Design allows you to add existing models as lifelines in your sequence diagrams, and select messages to match the model to which you want to send messages.

Sequence diagram example

For example, you can create a sequence diagram with the following operations.

Example of creating a sequence diagram using a component and its input ports

  • Add [Component] defined as a model as a lifeline.
  • When adding a message between components, select the destination port of the message from [In Port] provided by [Component].

An example of creating a sequence diagram using a class and its methods

  • Add [Class] defined as a model as a lifeline.
  • When adding a message between classes, select the method to call from [Method] provided by [Class].

To make it possible to add a specific type of model as a lifeline, set the type of model that can be mapped to the lifeline as the view definition of the sequence diagram. This is called a lifeline mapping definition.

In order to be able to select messages according to the model of the message destination, set fields that can be associated with messages for each type of model as the view definition of the sequence diagram. This is called a message mapping definition.

In the following, we will explain how to define a sequence diagram view in the following order.

  • Set the types of models that can be added to the lifeline
  • Set message choices for each model type

Set the types of models that can be added to the lifeline

To set a lifeline mapping definition so that you can add a specific type of model as a lifeline in a sequence diagram, do the following:

Screen capture_or_GIF animation

Operation procedure
  1. Display the target sequence diagram in the editor.
  2. Click Sequence Diagram > Mapping > Edit Lifeline Setting from the ribbon to open the Edit Lifeline Setting dialog.
  3. Click the + icon at the bottom right of the Mapping list to open the New Lifeline Mapping dialog.
  4. Select Class from the Mapping Target pull-down list.
  5. Press the [...] button of [Data Type] and select the type of model to be added as a lifeline (e.g. component).
  6. Change [Diagram] and [Model Name] if necessary, and click the [OK] button.
  7. Once the lifeline mapping definitions have been set, the models available for adding as lifelines will now appear in the Reference tab of the toolbox.

Set message options for each model type

To set up message mapping definitions so that messages can be selected according to the model to which they are sent, do the following:

Screen capture_or_GIF animation

Operation procedure
  1. Display the target sequence diagram in the editor.
  2. Click [Sequence Diagram] > [Mapping] > [Edit Message Setting] from the ribbon to open the [Edit Message Setting] dialog, where [Mapping] lists the types of models that can be added to the lifeline. increase.
  3. Move the pointer to the field to associate message with and click the + icon to open the Setting the message mapping definition dialog.
  4. From the Target Field pull-down list, select the field to associate with the message.
  5. From the Title pull-down list, select the field to display as the message label.
  6. Select [Command Parameter] and [Return type] as necessary, and press the [OK] button.
  7. Repeat steps 3 through 6 if you want to associate more than one field.
  8. After setting the message mapping definition, options will be displayed when adding a message.
note
  • Before setting the message mapping definition, it is necessary to set the types of models that can be added in the lifeline mapping definition.