There are five diagrams in UML for modeling the dynamic aspect of the system of which the most important and widely used diagram in today’s corporate world is Activity Diagram.
Activity Diagram visually presents a sequence of actions or flow of control from activity to activity in a system. It denotes all the activities happening in the system through system perspective and not actor/user perspective. The activities modeled in Activity diagram can be sequential and concurrent.
Generally stakeholders of the project will be extremely busy and will have many issues to manage; hence it is very important that the communication to them should be clear and without any ambiguity. Activity diagrams will provide a platform where business and development sides of an organization can come together and understand the same process and behavior without any misconceptions.
Activity diagram is basically a flow chart or process flow diagram but the basic difference between flowchart and activity diagram is the data which is being modeled, in other words flowchart models the entire business process but activity diagram models where the system is involved and only from the system perspective.
Basic Components or Drawing Elements in Activity Diagram:
- Action: An activity which is done by system or users to perform a given task and it is denoted by round-edged rectangles i.e.
- Decision node: This component is used when decision or choice comes into picture and it is denoted by Diamond shape i.e. It includes single input and one or multiple outputs.
- Control flow: These are the connectors that show the flow between the steps in the diagram and are represented by an arrow showing the direction.
- Start node: It is the initial node symbolizing the beginning of the activity. It is represented by black circle.
- End node: It is the final node representing the last step in the activity and it is represented by black dot outlined by black circle.
- Stop node: it is also called as flow final symbol representing the end of specific process flow only and not the end of all flows in an activity.
- Guard condition: A guard condition is represented by square brackets with condition text within the brackets. A Guard condition is placed next to decision marker/symbol to let the user know on what condition the activity flow should split off.
- Continues node: If the activity is huge which require multiple pages then to denote the continuity of the activity we use this node at the end of one page and starting of the next page.
- Branch and Merge: It is used to combine multiple concurrent activities and reintroduce them to a flow where only one activity occurs at a time. It is represented by thick vertical or horizontal line.
- Fork and Joint: Splits a single activity flow into multiple concurrent activities and it is symbolized with multiple arrowed lines from a joint.
Apart from the above Primary/ Basic symbols, Activity Diagrams also use couple of other nodes which are used in strict adherence to UML for Business Analysis.
- Note Symbol: If the creater wantsto give additional information that does not fit into the diagram itself then note symbol is used it gives added clarity and specification.
- Nested loop activity or option loop symbol: If an activity contains series of other activities internally then this symbol is used. It denotes the repetitive sequence within the loop.
- Send Signal symbol: Indicates that a signal is being sent to a receiving activity.
- Receive Signal Symbol: denotes the acceptance of event.
Examples of Activity Diagram for a Banking System:
The below diagram shows the process of either withdrawing money or depositing money into the bank account. The below activity diagram shows the deposition and withdrawal activity on same chart.
Process of drawing the Activity Diagram:
As mentioned in the earlier paragraphs Activity Diagrams are basically flowcharts with additional capabilities like branching, parallel flow and swim lines etc .As the Activity diagrams came into existence to simplify the complexity of the activity, utmost care should be taken to remove clutter and unnecessary steps in the diagram.
Before drawing the activity diagram we should have clear understanding of the elements used in the diagram. The basic elements which are to be identified before initiation of the diagram are:
- Condition and
After Identification of above elements, make a mental layout of the entire flow enabling it to transform into Activity diagram.
Few points to be noted with respect to activity diagrams:
- Activity diagrams can be drawn based on period/frequency i.e. one-time, Daily, Weekly, Monthly, Annually etc
- Activity Diagrams can be drawn at any level i.e. Module, Department, Functionality etc.
- There can be multiple Activity Diagrams for a single case study.