UML Diagrams
Activity Diagram
O/R Mapping
Mac OS X
Tips and Tricks
VP Suite
Change Log

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.
create_branches_with_decision_node-1.jpg

Method 2 – Creating an activity diagram from the toolbar:
Click on the New Activity Diagram buttoncreate_branches_with_decision_node-2.jpg from the toolbar. A new activity diagram will be created.
create_branches_with_decision_node-3.jpg

Method 3 – Creating an activity diagram from the Diagram Navigator:

  1. Right click on the Activity Diagram from the Diagram Navigator on the left side.
  2. Click on the Create Activity Diagram from the pop-up menu. A new activity diagram will be created.
    create_branches_with_decision_node-4.jpg

Drawing Activity Diagram

  1. Draw an initial node by choosing the Initial Node icon on the diagram palette, then clicking on the diagram.
    create_branches_with_decision_node-5.jpg

  2. Click on Control Flow → Action resource to draw a new control flow and action. Rename the action as Validate ATM Card.
    create_branches_with_decision_node-6.jpg

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.
create_branches_with_decision_node-7.jpg

Method 2:

  1. Draw another action. Rename the new action as Withdraw Money.
    create_branches_with_decision_node-8.jpg

  2. 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.
    create_branches_with_decision_node-9.jpg

Adding the Guard Conditions

  1. 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
  2. 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

 
 
Last modified: 2006/01/09 04:09
 
 
Home | Recent Topics | Highlights | UML Diagrams | Tips and Tricks | Object-Relational Mapping
visual-paradigm.com Home | Training Center | UML Center | VP Gallery | Discussion Forum | UML Open Directory