Creating Branches with Decision Node Using Resource-Centric Interface
An activity diagram is used to illustrate the dynamic view of a system which shows the flow among objects or the flow of control from activity to activity within a system.
In the activity diagram, you can create a branch using the decision node (represented by a diamond), which specifies the alternate paths regarding a guard condition. Normally, a branch has one incoming transition and two outgoing transitions. For each outgoing transition, you can specify the guard condition, which is evaluated when the control enters the branch.
Within VP-UML which provides the resource-centric interface, creating a branch can be simply done by using the smart resource provided on the action element.
Creating a New Activity Diagram
You can create an activity diagram by any of these 3 methods listed below.
Method 1- Creating an activity diagram from the menu bar:
On the menu, select File > New Diagram > UML Diagrams > Activity Diagram. A new activity diagram will be created.

Method 2 – Creating an activity diagram from the toolbar:
Click on the New Activity Diagram button
from the toolbar. A new activity diagram will be created.

Method 3 – Creating an activity diagram from the Diagram Navigator:
Right click on the Activity Diagram from the Diagram Navigator on the left side.
Click on the
Create Activity Diagram from the pop-up menu. A new activity diagram will be created.
Drawing Activity Diagram
Draw an initial node by choosing the
Initial Node icon on the diagram palette, then clicking on the diagram.
Click on
Control Flow → Action resource to draw a new control flow and action. Rename the action as
Validate ATM Card.
Creating Branches
You can create branches by any of these 2 methods:
Method 1:
Click on Create Branch with decision node resource of the Validate ATM Card action. A new branch with decision node is created. Rename Action as Withdraw Money and Action2 as Reject ATM Card.

Method 2:
Draw another action. Rename the new action as
Withdraw Money.
Click on
Create Branch with Decision resource of the
Validate ATM Card action and drag it to the
Withdraw Money action. A new branch with decision node is created, rename the newly created action as
Reject ATM Card.
Adding the Guard Conditions
Right click on the control flow and click on the Open Specification... from the pop-up menu to open the Control Flow Specification dialog box
Enter the guard condition in the Guard field. For example put the Card is not valid for the control flow between the decision node and Reject ATM Card action, and put the Card is valid for the control flow between the decision node and Withdraw Money action.
{uml_diagrams:activity_diagram:create_branches_with_decision_node:create_branches_with_decision_node-10.jpg}}
Related Articles
Resources