Drawing decision and merge nodes

You can draw decision and merge nodes.

About this task

decision nodes show branching conditions. A decision node can have only one incoming flow and two or more outgoing flows. The outgoing flows are labeled with a distinct guard condition and no event trigger. A predefined guard, denoted [else], can be used for no more than one outgoing flow.

A merge node combines different flows to a common target.

Note: Condition and merge nodes represent nodes. A node in a package represents a computer or other computational resource used in the deployment of your application. For example, a node can represent a type of CPU. Nodes store and execute the run-time components of your application. In the model, a node can belong only to a package, not to another node (that is, nodes cannot be nested inside other nodes).

Procedure

  1. To draw a decision node, click the decision node button DecisionNode button.
  2. Click, or click-and-drag, in the diagram to position the decision node where you want it.
  3. Draw at least two actions that will become targets of the outgoing flows.
  4. Draw an incoming flow from the source action to the decision node.
  5. Draw and label the outgoing flows from the decision node to the target actions.
  6. To draw a merge node, click the merge node button Merge Node button.
  7. Click in the diagram to place the junction at the intended location.
  8. Draw flows going into, and one flow going out of the junction.
  9. Label the flows if you want.

Results

The following diagram shows the following behavior: When the phone rings, if someone picks up on the other end, you can talk; otherwise, you must leave a message. The decision node represents the decision point. In other words, after the PhoneRings() operation, if SomeonePicksUp resolves to True, the Talk() operation is called. Otherwise, the LeaveMessage() operation is called.

Diagram showing decision nodes

Use the Display Options window to determine whether to display the name, label, or nothing for the decision node.