Prev Next

Generate Sequence Diagram

When you create a scenario on an element and then generate a Sequence diagram, an Interaction is created as a child of the selected element to act as a container for the diagrams - the Basic, Alternate and Exception paths are each modeled as a separate Sequence diagram under the Interaction.


On a diagram or in the Browser window, select an element and use one of these access paths to display the 'Structured Scenario' tab, then click on Scenario Generation Dialog and select 'Sequence'.


Design > Element > Editors > Scenarios (existing scenario) : Edit

Design > Element > Editors > Properties Dialog > Scenarios > Scenario Editor

Context Menu

Right-click on element | Properties | Responsibilities > Scenarios (existing scenario) : Edit

(In the 'Element' tab of the Browser window) Right-click on scenario | Show Scenario Editor

Keyboard Shortcuts

Ctrl+4 > Scenarios (tab of the Responsibilities Window)

Shift+Enter > Scenarios ('Properties' dialog)

Shift+Alt+S ('Properties' dialog)

Alt+9 > Scenarios


On diagram, right-click on element > Properties > Special Action > Scenarios > Scenario Editor


  • All the elements involved in the scenario should be identified in the 'Context Reference' tab; that is, relationships must already exist between the scenario parent element and the other elements named in the scenario
  • Each Context Reference element named in a scenario step is modeled as a Lifeline
  • The step itself becomes the Message between an originator and its destination(s)
  • The first Context Reference element in a step is treated as the originator
  • The subsequent Context Reference element(s) become the destination(s)
  • Because the diagram generator acts on element names in the step, you should avoid using the element names as normal text; for example, in step 1 in the example dialog, the term ATM-Card is interpreted as a reference to the ATM element, and two 'Customer inserts ATM-Card into ATM' messages are generated for the step (to avoid confusion, in the diagram the first Message has been deleted)
  • If the 'Show Sequence Numbering' checkbox on the 'Diagram Sequence' page of the 'Preferences' dialog is not selected, the Message name on the Sequence diagram is prefixed by the step number, as shown in the example diagram; if the checkbox is selected, the message sequence number is shown instead of the step number
  • The values of the 'Uses', 'Results' and 'State' columns are added as Tagged Values of the Message


Showing a structured scenario for a UML Sequence diagram.

Showing the UML sequence diagram that represents a structured scenario.

Learn more