MagicDraw 18.3 Documentation
An Activity diagram owned by a Use Case can be transformed to the Use Case scenario in the textual format that is displayed in the Use Case Specification window. Changes done in the scenario on the Activity diagram are synchronized with the same Use Case scenario represented in the Use Case Specification window. To transform the scenario from the diagram to the text, the scenario steps should be modeled under strict rules in the Activity diagram.
To create a Use Case scenario from an Activity diagram
- Under the Use Case, create an Activity diagram. Do one of the following:
- In the Use Case Specification window, click the Inner Elements property group. In the Inner Elements specification pane, click the Create button and select Create Diagram > Activity Diagram. Name the Activity diagram the same as the Use Case and click Close. The Activity together with the Activity diagram is created in the Model Browser.
- Select the Use Case in the Model Browser. From its shortcut menu, select Create Diagram > Activity Diagram. Name the Activity diagram the same as the Use Case. The Activity diagram together with the Activity is created.
The Activity diagram name should match the Use Case name. This is a mandatory requirement in order to represent the scenario from the Activity diagram in the Use Case Specification window.
3. After the Activity diagram is created, open the Specification window of the Use Case owning the the created diagram and click the Use Case Scenario property group. The created scenario is represented in a textual form in the Use Case Scenario pane.
If a scenario is modeled incorrectly in the Activity diagram, you will not be able to transform it to a textual form. In the Specification window, you will get a warning that Use Case scenario cannot be read with the list of possible reasons why this scenario cannot be read.
In this example, you can see that there is listed the Initial Node element and the reason of incorrect modeling — No outgoing flows. According to the Use Case scenario and Activity diagram mapping rules, it means that you have to create a Control Flow relationship from the Initial Node to the first Call Behavior Action (the Call Behavior Action that represents the first basic flow in the Use Case scenario). After you will solve this incorrect modeling in the Activity diagram, you will be able to continue work with the Use Case scenario and the Activity diagram.
- No labels