Creating branches and merges
A branch has a single incoming flow and multiple outgoing guarded flows. Only one of the outgoing flows can be traversed, so the guards should be mutually exclusive.
In this example the (BankView) references are to be validated:
•branch1 has the guard "reference missing", which transitions to the abort activity
•branch2 has the guard "valid", which transitions to the collectAccountInfos activity.
Creating a branch (alternate flow)
1.Click the DecisionNode icon in the title bar, and insert it in the Activity diagram.
2.Click the ActivityFinalNode icon which represents the abort activity, and insert it into the Activity diagram.
3.Click the "Validate References" activity to select it, then click the right-hand handle, ControlFlow, and drag the resulting connector onto the "DecisionNode" element. The element is highlighted when you can drop the connector.
4.Click the "DecisionNode" element, click the right-hand connector, ControlFlow, and drop it on the "collectAccountInfos" action. Please see "Inserting an Action (CallOperation" for more information.
5.Enter the guard condition "valid", in the guard field of the Properties tab.
6.Click the DecisionNode element and drag from the right-hand handle, ControlFlow, and drop it on the "ActivityFinalNode" element. The guard condition on this transition is automatically defined as "else". Double click the guard condition in the diagram to change it e.g. "reference missing".
|Note:||UModel does not validate, or check, the number of Control/Object Flows in a diagram.|
Creating a merge
1.Click the MergeNode icon in the icon bar, then click in the Activity diagram to insert it.
2.Click the ControlFlow (ObjectFlow) handles of the actions that are to be merged, and drop the arrow(s) on the "MergeNode" symbol.