Hello Everyone Welcomes to Master2Teach Step by Step Guide
In this video, you’re going to learn
What is the Activity Diagram?
How to draw an activity diagram?
We will see each notation one by one.
We will learn step by step with examples.
I will try my best to explain step by step.
If you haven’t subscribed to our channel, please click on the subscribe button and subscribe
to our YouTube channel.
Ok let’s start.
What is the Activity Diagram?
One of the other important diagrams in UML
is the Activity Diagram which shows a dynamic view of the system.
The activity diagram is a flowchart to represent the flow of control among the activities in
a system.
Simply, it’s an operation of the system shown in the diagrammatical form where it
shows all the control flow from one operation to another.
So far we have gone through the use case diagram,
communication, sequence, and class diagram which shows the message flow from one object
to another but in the activity diagram shows the message flow from one activity to another.
If you haven’t gone through the previous
video, you can find the link in the description of this video below.
The flow of operation can be sequential, branched
or concurrent.
The activity diagram is sometimes considered as the flowchart.
Although the diagrams look like a flowchart, but they are not.
Now let’s move to learn different notations used in the activity diagram.
1.
Start Node: The black small filled circle is the standard notation for an initial state
before an activity takes place.
In the flow chart we draw in an oval shape label with Start whereas in the activity diagram
we draw with fill small circle as shown in the diagram to represent the start of the
activity.
2.
Final Activity node: The Black circle that looks like a selected radio button is the
symbol for the end state of activity.
In the flow chart we represent in oval shape label with the end in it whereas in the activity
diagram we represent with small fill circle include borderline circle as shown in the
figure.
3.
Activity: The activity symbols are the basic building blocks of an activity diagram and
usually have a short description of the activity they represent.
It is represented by the oval shape as well as a round-edged rectangle box as shown in
the figure.
4.
Control Flow: A solid line with an arrow represent the direction flow of the activities.
The arrow points in the direction of progressing activities.
5.
Join: A join combines two concurrent activities back into a flow where only one activity is
happening at a time which is represented as shown in the figure.
6.
Fork: A fork splits single activity flow into two concurrent activities which are represented
as shown in the figure.
For example an online flight reservation system The activity starts and needs to enter arrival
and departure dates After that there needs to perform two activities
one search availability whereas another enters personal details which are represented by
the fork symbol.
Similarly these two activities join together and flow another activity like select flight
which can be shown by join symbol as shown in the figure.
7.
Decision Symbol: It is similar to the flow chart which is represented by the diamond
shape where two paths coming out of a decision and the condition text lets you know which
options are mutually exclusive.
8.
Condition: condition text is placed next to a decision marker to let you know under what
condition an activity flow should split off in that direction as shown in the figure.
9.
Merge Node: Merge is similar to the join where two activities are merged with the condition
and only one activity flows forward as shown in the figure.
For example: While Sending E-mail, if the email is private, encrypted it before sending
it while if not private, send as regular mail.
These two activities are merged with the merge node which is the same as the decision represented
by a diamond shape.
In Decision one activity as input and there will be two output according to a condition
whereas in merge two activities are input and output only one activity
Let’s learn more notations use in the activity diagram.
10.
Final Flow node: It may be confusing with the final activity node.
It represents the end of a specific process flow which is denoted by a circle with cross
lines inside the circle.
The difference between final activity and final flow-node is that the flow final node
denotes the end of a single control flow whereas activity final note denotes the end of all
control flows within the activity.
11.
Partition: activity diagram partition is also known as swim lanes which are used to represent
or group actions carried out by different actors in a single thread as shown in the
figure.
12.
Note: or Comment: This is similar to the sequence diagram, used to add relevant comments to
elements that are represented by one corner folded symbol as shown in the figure.
Beside this notation there are other notations
also used like Signal Sending which is used to represent
the action of sending a single to an accepting activity
Signal receipt, which is used to represent
that signal is received.
Let’s see an example of Borrow's book in the library system case study.
Begin with start note to start the activity
– First of all, members need to login to the
system, for which we make an activity.
There may be two types of member new member and old or register member so we show with
the condition is a member or not
Now if not a member, follow with registration activity whereas if already a member check
if any book needs to return.
Again another condition appears, if no, join with the after registration activity using
join.
If yes, process with another activity which is checking fines.
If yes, then process for the collecting fine activity.
Join these two activities and follow them for further activities.
The next activity is searching now which is for both newly registered members as well
as the old one.
So join the activity and process for the search book activity.
Again condition with found required book or not.
If no, search until not found.
If the required book is found, process another activity like view book details and request
to issue the book and receive a book and finally end with the final activity note.
In this way, you can draw the activity diagram
using a different kind of notation showing stepwise activities.
I hope you learned from this video tutorial, if you have any questions or comments please
make sure to leave a comment in the comment section below.
Also please be sure to like this video and subscribe to my channel if you haven’t already.
Thanks very much for watching.
Check us out for more in IT tutorial and Guide on website master2teach.com and we’ll see
you again soon bye.