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.
Procedure
- Click the DecisionNode button
.
- Click, or click-and-drag, in the diagram
to position the decision node where you want it.
- Draw at least two actions that will become
targets of the outgoing flows.
- Draw an incoming flow from the source action
to the decision node.
- Draw and label the outgoing flows from the
decision node to the target actions.
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.
Use the Display Options window to determine whether
to display the name, label, or nothing for the decision node.