Skip to main content

Editing Sequence Diagrams

Overview

In Next Design sequence diagrams, you can describe interactions between objects by adding existing models as lifelines and selecting messages to match the target models. For example, you can add a component defined as a model as a lifeline. Then, when adding messages between components, you can select the destination port from the ports provided by the destination component.

The following describes sequence diagram editing operations in the following order:

  • Adding a Model to a Sequence Diagram
  • Editing Lifelines and Messages
  • Adding a Model as a Lifeline
  • ​​Selecting Messages to Match a Model
  • Adding a Composite Fragment
  • Adding Cross-References

Adding a Model to a Sequence Diagram

To add a model to a sequence diagram, add it from the context menu in the Model Navigator, just like adding other models.

Adding a Sequence Diagram Model

info
  • The types of sequence diagrams that can be added (e.g., inter-component sequence diagrams) are defined by the profile.

Editing Lifelines and Messages

To add lifelines and messages between lifelines to a sequence diagram, follow these steps:

Editing Lifelines and Messages

Procedure
  1. Add a lifeline by dragging and dropping [Lifeline] from the [New] tab in the toolbox or the sub-toolbox on the far left of the editor editing area onto the editor.
  2. Edit the name of the added lifeline.
  3. Move the pointer over the lifeline that will be the source of the message.
  4. Drag the [▲] icon that appears on the left and right of the lifeline and drop it onto the lifeline that will receive the message to add it.
  5. Edit the name of the added message.
note
  • To add messages other than synchronous messages (asynchronous, response, creation, discard), select the message type in the sub-toolbox before adding the message.
About fixing the mode on the subbar
  • Double-clicking the mode button on the subbar (move elements together, synchronous, asynchronous, response, creation, discard) will fix the mode, allowing for continuous operation.
  • When the mode is fixed, a padlock icon will appear in the lower right corner of the icon.
  • Pressing the Esc key or selecting another mode will release the mode fixation.
About moving messages
  • You can move a message in the sequence diagram by dragging it in combination with a key.

| Element | Operation | Action |

|----|----|----|

| Message | alt + up/down drag | You can swap the order with the previous and next messages. |

  • When you associate a note with an element using an anchor, the note will move in conjunction with the movement of the associated element. The elements that can be associated are messages, execution specifications, composite fragments, interaction usage, lifelines, and lifeline destruction.
  • You can move elements together by clicking the [Move Elements Together] button on the subbar and then dragging the [Move Line] on the editor.
Vertical Scrolling
  • For sequence diagrams that do not fit within the editor's editing area, you can move the pointer within the sequence diagram frame and use the mouse wheel to fix the object names at the top of the lifelines and scroll only the bottom of the lifelines.
Editing Availability While Adding Messages
  • While adding synchronous, asynchronous, response, generation, or destruction messages from the subtoolbox, the following edits other than adding messages will be disabled until the message addition is complete or the addition is canceled:
  • You will not be able to create note anchors.
  • You will not be able to add lifelines, destruction, notes, message ends, composite fragments, or interaction usage.
  • You will not be able to change the operators of composite fragments by double-clicking.

Adding a Model as a Lifeline

To add an existing model as a lifeline in a sequence diagram, follow these steps:

Screen Capture_or_GIF Animation

Procedure
  1. If the types of models that can be added to a lifeline are defined in the metamodel, click the [Reference] tab in the toolbox to display the models that can be added.
  2. Drag a model from the [Reference] tab in the toolbox and drop it onto the editor to add it as a lifeline.
  3. Immediately after adding, only the [Model Name] will be displayed in the lifeline's label, and the lifeline name will be empty. Enter individual names as needed.
Other Procedures

You can assign a new model to an existing lifeline or change it to a different model using the following steps:

  1. Select the lifeline you want to change and execute [Change Lifeline Type] from the context menu.

  2. Select the model to assign to the lifeline and press the [OK] button. The [Model Name] defined in the metamodel will be displayed in the lifeline's label.

caution
  • Changing the lifeline type (the model assigned to the lifeline) will reset the type of messages sent to that lifeline.

Selecting a message to match the model

To select a message to match the recipient model when adding it, follow these steps:

Screen capture_or_GIF animation

Procedure
  1. If the message options for the model (the target fields associated with the message) are defined in the metamodel, these options will be displayed when you try to add a message, similar to "Editing Lifelines and Messages" above.

  2. Select a message and press the [OK] button. The message will be added, and the [Title] defined in the metamodel will be displayed in its label.

note
  • When selecting a message, choosing [(No Association)] allows you to add a message that can be freely edited regardless of the model.
Other Procedures

You can change the type of an existing message to match the model using the following steps:

  1. Select the message you want to change and execute [Change Message Type] from the context menu.

  2. Select the type to assign to the message and press the [OK] button. The message label will change to the [Title] defined in the metamodel.

Adding a Compound Fragment

To add a compound fragment representing branching processes, etc., to a sequence diagram, follow these steps:

Screen Capture_or_GIF Animation

Procedure
  1. Add a compound fragment by dragging and dropping [Fragment] from the [New] tab in the toolbox or the sub-toolbox on the far left of the editor editing area onto the editor's live line.

  2. Double-click the operator (default: alt) in the upper left of the composite fragment to edit it.

  3. Double-click the guard of an operand within the composite fragment to edit it.

  4. To add an operand within the composite fragment, select "Add Operand" from the composite fragment's context menu.

  5. To change the order of operands within the composite fragment, point to the operand's guard and drag and drop it.

note
  • Composite fragments can only be added or moved to locations with lifelines.

Adding the Use of Cross-References

To add the use of cross-references to a sequence diagram, follow these steps:

Procedure
  1. Drag and drop "Use Cross-Reference" from the [New] tab in the toolbox or the sub-toolbox on the far left of the editor editing area onto the editor to add the use of cross-references.

  2. Select the added use of cross-references and click "Associate Cross-Reference" in the context menu.

  3. Select the sequence diagram to reference.

tip
  • To jump to an associated sequence diagram, double-click "Use Cross-Reference" or select "Use Cross-Reference" and click "Show Associated Cross-References" in the context menu.
note
  • "Use Cross-Reference" can only be associated with sequence diagrams. It cannot be associated with messages.