MagicDraw 18.5 Documentation

Skip to end of metadata
Go to start of metadata

This functionality is available in Standard, Professional, Architect, and Enterprise editions.

With the help of the Use Case scenario editor, you can do the following:

  • Create, review, and edit steps of the Use Case scenario by using the convenient textual values editor.
  • Automatically create an Activity diagram representing the textual Use Case scenario flow. This gives you the possibility to have the textual numbered action flow and its graphical representation.
  • Create the Use Case scenario from the Activity diagram for the particular Use Case and then automatically represent this action flow as textual information in the Use Case scenario.

Example of Use Case scenario

The following figure depicts the same scenario represented in the Activity diagram.

Example of activity diagram with basic, alternative, and exceptional flows

A Use Case scenario can have defined basic, alternative, and exceptional flows. 

Basic flow

A basic flow represents the sequence of basic steps or actions of the Use Case scenario. You can also add steps from included or extended use cases to the flow. Each basic flow step can have one or more alternative and exceptional paths. Preceding figures depict the basic flow consisting of four steps. Letters and numbers in the brackets next to the basic flow step indicates how many alternative conditions and exceptional types the particular step has. Letter A indicates alternatives flows and letter E indicates exceptional flows.

In an Activity diagram, the basic flow is the main path down from the initial node to the final node.


Alternative flow

An alternative flow is an alternative path of the basic flow. You can define an alternative flow from the particular step of the basic flow. The alternative flow is an alternative solution that is performed after the defined condition is satisfied. The alternative flow contains steps that are executed if condition(s) occurs.

So, in the Use Case scenario, the alternative flow is specified by the two parameters - by the alternative condition and the alternative flow steps.

The following figure shows the content of the Alternative Flow tab of the Use Case Scenario in the Use Case Specification window.

Alternative flow in the Specification window

Here, the alternative flow is created for the second step of the basic flow — 2. Get Loan Details. The alternative flow has the condition named 2.1 Item is overdue. The condition contains one alternative flow step named 2.1.1 Penalize for overdue.

In the Activity diagram, the alternative flow is created between decision and merge nodes. The alternative condition is represented as decision node - that is, the name of the alternative condition in the Activity diagram is the name of the decision node. In the Activity diagram, the alternative flow step is are represented as Call Behavior action.

See the alternative flow representation in the activity diagram in the following figure.

In the Activity diagram, you can read the alternative flow as follows: if the item is overdue, then - penalize for overdue; else, continue to the basic flow.


Exceptional flow

An exceptional flow is an exceptional path from the particular basic flow step, or it can be a quick solution for exit. The exceptional flow contains steps that are executed if something goes wrong, such as an input from the actor that the system cannot handle. An example can be if in the opened dialog user clicks the Cancel button.

In the Use Case scenario, the exceptional flow is specified by two parameters - by the exception type and the exceptional flow steps.

The type of the exception object indicates the nature of the exception. As a type of the exception can be used any class.

The exceptional flow steps are performed as actions when the execution occurs. The exceptional flow steps are specified for the concrete type. Normally, there is one exceptional flow (or in other words one exception type) assigned for one basic flow step. There can be any number of exceptional flow steps specified for one exception type.

The following figure shows the content of the Exceptional Flow tab of the Use Case Scenario in the Use Case Specification window.

Exceptional flow in Specification window

Here, the exception flow is created for the third step of the basic flow — 3. Confirm Return. The exceptional flow has the type named 3.1 Cancel. That is the Cancel class is assigned as the exception type.The type contains one exceptional flow step named 3.1.1 Close Item Dialog.

In the Activity diagram, the exceptional flow is connected using the Exception Handler relationship. The Exception Handler has the type specified - the same as is the exception type, in our sample the Cancel class. Exceptional flow steps in activity diagram are represented as Call Behavior actions.

You can create a Use Case scenario in the Use Case Specification window using the Use Case Scenario property group wherein you can specify the basic, alternative, and exceptional flows, as well as to open the Activity diagram.