In this article, I will cover how to build activity Diagrams using the case study we started last week.
Introduction
Before delving into the activity diagram let me take a couple of steps back.
An activity diagram is part of the Unified Modeling Language structure.
What is UML and why does it matter?
A UML diagram is a diagram based on the UML (Unified Modeling Language) with the purpose of visually representing a system along with its main actors, roles, actions, artifacts or classes, in order to better understand, alter, maintain, or document information about the system.
What is a System you may ask?
The dictionary defintiion of a system is “a set of things working together as parts of a mechanism or an interconnecting network.”
However as it relates to Information Technology it is “An information system is a type of platform or collection of platforms that exist to manage a set of information or a technology product. For instance, the hardware and software used to create, maintain and access an electronic health record is an information system.”
Here are the different types of UML diagrams:
- Structure Diagrams include the Class Diagram, Object Diagram, Component Diagram, Composite Structure Diagram, Package Diagram, and Deployment Diagram.
- Behavior Diagrams include the Use Case Diagram (used by some methodologies during requirements gathering); Activity Diagram, and State Machine Diagram.
- Interaction Diagrams, all derived from the more general Behavior Diagram, include the Sequence Diagram, Communication Diagram, Timing Diagram, and Interaction Overview Diagram.
To read more about the types of UML diagrams you can access the following link: https://en.wikipedia.org/wiki/Unified_Modeling_Language
The scope of this article is to introduce to the Activity diagrams and what they are.
Just to back up in part 1 of the series of becoming a Business Analyst I introduced you to a Case Study that can be accessed here.
Session 1 – Business Analysis Training for New and Aspiring Business Analysts
The article will dive into how to use the case study to map the activity diagram.
What is an activity diagram?
An activity diagram visually presents a series of actions or flow of control in a system similar to a flowchart or a data flow diagram. Activity diagrams are often used in business process modeling. They can also describe the steps in a use case diagram. Activities modeled can be sequential and concurrent. In both cases an activity diagram will have a beginning (an initial state) and an end (a final state).
The basic idea behind an Activity diagram is to illustrate what the system will be doing.
This is a precursor to building the Use Case Diagram which will be covered in the next article.
What are the Elements of An Activity Diagram?
The following are notations/ elements used to build an activity diagram. This can be downloaded from here as well. https://baknowledgeshare.com/business-analysis-templates/
How do you do an Activity Diagram?
Before we get into understanding how to do an activity diagram, I want to illustrate the differences between an Activity Diagram and a flow chart.
Activity Diagram | Flow Chart |
Part of the UML Family | This is used as part of Business Process Modeling |
In UML, an activity diagram is used to display the sequence of activities and allows for parallel activity processing. | Is Sequential but assumes non parallel activities |
Used in software development | Used to understand Business Processes |
Let’s warm up by taking on a simple example of making tea.
Although this is not system related it will give you a sense of how to approach building an activity diagram.
Step 1: Write down the activities of making Tea
Here goes:
To make Tea I need to :
Fill the Kettle
Heat the Water
Add Tea
Add Milk
Drink
The tasks above will are step by step activities to making tea. Keep in mind my process of making tea will be very different than yours.
Step 2: I used Lucid Chart to build the activity diagram.
My first step is to use the start point to start the process, illustrated by the elemnt below.
The next steps is to use the control flow i.e. the arrow to start building the activties.
I Filled the Kettle and heated the water. What comes next? Well ask your self did the water boil. If the Answer is Yes then continue to the next activity. If it did not boil let the water heat. If it has boiled then there are two parallel activities that can be performed i.e. Add tea leaves and Add milk. This is represented by a fork
End the the process using the following symbol.
Phew, that was not all that bad. The more you practice the more this will get easier.
The next step is to use the case study located here to build the activity diagram.
User Logs in
Search Food
View Food Choices
Add to Cart (View, Edit Cart)
Confirm Order
Make Payment (Credit/Debit, Cash)
Select Delivery (Doordash, Pickup)
Confirmation Message
End
Step 2: Here is the activity diagram for the Online ordering system.
In Conclusion
I went through the definition of the activity diagram, the elements of the activity diagram and the process of building an activity diagram.
Do you have any Activity Diagrams that you would like to share?