Decisions and Merges

Decisions and merges direct the flow of an activity. Decisions specify which output flow to use when there is more than one option. Merges combine multiple input flows into one output flow.

Context

A decision usually has one input flow and multiple output flows. A merge has multiple input flows and one single output flow. In the activity diagram, the node type is calculated automatically based on the number of input/output flows on the node.

In this example, the decisions dc1, dc2, and merges mg1, mg2, specify the alternative sequences of the View Product Details activity.

Procedure

  1. Drag the Decision tool from the toolbox and drop it onto your diagram. The default type is a decision. Specify an expression alias for it as appropriate.

    The following properties are available on the Info tab in the General category:

    Property

    Description

    Name/Code/Comment

    Identify the object. The name should clearly convey the object's purpose to non-technical users, while the code, which is used for generating code or scripts, may be abbreviated, and should not normally include spaces. You can optionally add a comment to provide more detailed information about the object. By default the code is synchronized with the name. To decouple name-code synchronization, enter a new code in the Code field.

  2. [optional] In the property sheet of the node, on the Info tab in the Condition category, enter the Expression and its Alias for it.

    The other tabs such as Dependencies and Diagrams contain additional properties information. For details, see Object Properties.

  3. Select the Flow tool (see Flows) in the toolbox and connect it with the appropriate objects. Alternatively, use the tools in its context menu to create the next object in the flow.