Generate Diagrams
If you have created a structured scenario, you can generate any of the following diagrams from that scenario:
- With ActivityParameter
- With Action
- With Action Pin
To generate the required diagram, follow the steps below:
- Create the scenario structure on the Structured Specification tab.
- Click on the Generate Diagram icon (
) in the toolbar on the tab. - Click on the type of diagram to generate.
Enterprise Architect generates the diagram and notifies you that generation is complete. Close the Properties dialog to review the diagram.
If the diagram being generated already exists under the selected element, the following prompt displays:

Select the appropriate radio button to:
- Overwrite the existing diagram (delete the existing diagram and elements, and create a new diagram and elements) or
- Synchronize the elements in the existing diagram with the scenario steps (however, Sequence and Robustness diagrams cannot be synchronized).
Note: |
The Synchronize elements in existing diagram option enables the Preserve Diagram Layout checkbox, which you can select to preserve the existing arrangement of elements and connectors on the diagram. Any new elements are added to the diagram in the default position, and you manually position them in the diagram as required. If you do not select the checkbox, the diagram is recast in the default layout. It is recommended that you uncheck the Preserve Diagram Layout checkbox if you are synchronizing elements with scenario steps:
|
Activity Diagram
An Activity is generated as a child of the selected element, to act as a container for the diagram. The scenario steps are modeled as Activities, and the values of the Uses, Results and State columns for each step are added as Tagged Values of the corresponding Activity.

Activity with ActivityParameter
The values of the Uses and Results columns are modeled as ActivityParameters.
The value of the State column is added as a Tagged Value of the Activities.
Note: |
ActivityParameters are added to the Project Browser and not to the diagram. |
The scenario steps are modeled as Actions, and the values of the Uses, Results and State columns are added as Tagged Values of the Actions.
The scenario steps are modeled as Actions, and the values of the Uses and Results columns are modeled as Input Pins and Output Pins respectively.
The value of the State column is added as a Tagged Value of the Actions.
Note: |
ActionPins are added to the Project Browser and not to the diagram. |
RuleFlow Diagram
A Rule Flow Activity is created as a child of the selected element, to act as a container for the diagram. The scenario steps are modeled as RuleTasks, and the values of the Uses, Results and State columns are added as Tagged Values of the RuleTasks.
State Machine Diagram
A StateMachine is created as a child of the selected element, to act as a container for the diagram. Each value in the State column is modeled as a State.
The scenario steps become the Transition connectors between the States, and the values of the Uses and Results columns are added as Tagged Values of the Transitions.

Sequence Diagram
Note: |
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. |
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 modeled as separate Sequence diagrams under the Interaction.
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, and the subsequent Context Reference element(s) become the destination(s).
Note: |
Because the diagram generator acts on element names in the step, you should take care to avoid using the element names as normal text. For example, in step 1 in the dialog below, 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.) |
The values of the Uses, Results and State columns are added as Tagged Values of the Message.


Robustness Diagram
A Collaboration is created as a child of the selected element, to act as a container for the Robustness diagram.
Notes: |
|

