Activity Diagram - Step by Step Guide with Example
Summary
TLDRThis video tutorial from Master2Teach introduces viewers to UML's Activity Diagram, a dynamic system representation showing control flow among activities. It explains the diagram's purpose, distinguishes it from a flowchart, and outlines its key notations, including start and end nodes, activities, control flow, and decision symbols. The tutorial also illustrates these concepts with a library system case study, guiding learners to understand and draw activity diagrams step by step.
Takeaways
- đ The Activity Diagram is an essential UML diagram that provides a dynamic view of a system, showing the flow of control among activities.
- đ It is used to represent the operation of a system in a diagrammatic form, illustrating the control flow from one operation to another.
- đ Unlike the use case, communication, sequence, and class diagrams, the activity diagram focuses on the flow of activities rather than the flow of messages between objects.
- đŻ The flow of operation in an activity diagram can be sequential, branched, or concurrent, reflecting the different ways activities can be executed.
- đ Start Node: The initial state before an activity begins is represented by a small filled circle in the activity diagram.
- đ Final Activity Node: The end state of an activity is symbolized by a black circle with a border, resembling a selected radio button.
- đ Activity: Basic building blocks of the diagram, represented by ovals or round-edged rectangles, with a short description of the activity.
- âĄïž Control Flow: Shown as a solid line with an arrow indicating the direction of the flow of activities.
- đ Fork and Join: Fork splits an activity into concurrent activities, while Join combines them back into a single flow.
- đ Decision Symbol: Represented by a diamond shape, it shows the point where the flow of activities can split based on conditions.
- đ Merge Node: Similar to Join, it merges two activities with a condition, allowing only one activity to flow forward.
- đ Final Flow Node: Indicates the end of a specific process flow, distinct from the Final Activity Node which denotes the end of all control flows.
- đą Partition: Also known as swim lanes, used to group actions performed by different actors within a single thread of the diagram.
- đ Note or Comment: Used to add relevant comments to elements, represented by a folded symbol in the diagram.
Q & A
What is the purpose of an Activity Diagram in UML?
-The purpose of an Activity Diagram in UML is to provide a dynamic view of the system by showing the flow of control among the activities in a system. It represents the flow of operations in a diagrammatical form.
How does an Activity Diagram differ from a flowchart?
-Although Activity Diagrams may look similar to flowcharts, they are not the same. Activity Diagrams focus on the flow of activities within a system, while flowcharts generally represent a sequence of operations or processes.
What is the notation used to represent the start of an activity in an Activity Diagram?
-The start of an activity is represented by a small black filled circle, which is the standard notation for the initial state before an activity takes place.
What symbol is used to denote the end state of an activity in an Activity Diagram?
-The end state of an activity is denoted by a black circle that resembles a selected radio button.
How are activities represented in an Activity Diagram?
-Activities in an Activity Diagram are represented by oval shapes or round-edged rectangle boxes, usually containing a short description of the activity they represent.
What does a solid line with an arrow in an Activity Diagram signify?
-A solid line with an arrow in an Activity Diagram signifies the control flow, indicating the direction in which the activities progress.
Can you explain the role of a Fork in an Activity Diagram?
-A Fork in an Activity Diagram splits a single activity flow into two concurrent activities, allowing them to be performed simultaneously.
What is the purpose of a Decision Symbol in an Activity Diagram?
-The Decision Symbol, represented by a diamond shape, is used to show where the flow of activities can split into multiple mutually exclusive paths based on certain conditions.
How does a Merge Node differ from a Join in an Activity Diagram?
-A Merge Node is similar to a Join in that it combines two activities, but unlike a Join, which combines two concurrent activities back into a single flow, a Merge Node merges activities with a specific condition, allowing only one activity to flow forward.
What is the significance of a Partition in an Activity Diagram?
-A Partition, also known as swim lanes, is used in an Activity Diagram to represent or group actions carried out by different actors within a single thread.
What is the role of a Note or Comment in an Activity Diagram?
-A Note or Comment in an Activity Diagram is used to add relevant comments or information to elements, represented by a symbol with one corner folded, providing additional context or clarification.
Can you provide an example of how an Activity Diagram is used in a real-world scenario?
-In the provided script, an example of a library system is given where the Activity Diagram is used to represent the process of borrowing a book, including steps like logging in, registering, checking for book returns, processing fines, searching for books, and issuing the book.
Outlines
đ Introduction to Activity Diagrams in UML
This paragraph introduces the concept of Activity Diagrams in the Unified Modeling Language (UML). It explains that Activity Diagrams provide a dynamic view of a system, illustrating the flow of control among activities. The paragraph clarifies that while Activity Diagrams may resemble flowcharts, they are distinct and serve to show the message flow from one activity to another, unlike the use case, communication, sequence, and class diagrams that focus on the flow of messages between objects. The video guide promises a step-by-step learning experience with examples and encourages viewers to subscribe for more content.
đ Exploring Notations and Examples in Activity Diagrams
This paragraph delves into the specific notations used in Activity Diagrams, starting with the Start Node and Final Activity Node, which represent the initial and end states of activities, respectively. It describes the Activity itself, represented by an oval or round-edged rectangle, and the Control Flow, indicated by a solid line with an arrow. The paragraph explains the purpose of Join and Fork symbols, which handle the convergence and divergence of concurrent activities. Decision Symbols and Conditions are detailed, illustrating how they guide the flow based on specific conditions. The explanation continues with Merge Nodes, Final Flow nodes, and the use of Partitions to group actions by different actors. Notes and Comments are also highlighted as important for adding context to the diagram. The paragraph concludes with a practical example of a library system, demonstrating how these notations can be applied to create a comprehensive Activity Diagram.
Mindmap
Keywords
đĄActivity Diagram
đĄUML
đĄControl Flow
đĄStart Node
đĄFinal Activity Node
đĄActivity
đĄFork
đĄJoin
đĄDecision Symbol
đĄMerge Node
đĄPartition
đĄNote or Comment
Highlights
Introduction to Master2Teach's Step by Step Guide on Activity Diagrams in UML.
Activity Diagrams represent a dynamic view of the system, showing the flow of control among activities.
The difference between Activity Diagrams and flowcharts, despite their similar appearance.
Notation explanation: Start Node symbolized by a small filled circle for the initial state.
Final Activity Node depicted as a black circle resembling a selected radio button for end state.
Activity symbols, the building blocks of an Activity Diagram, represented by ovals or round-edged rectangles.
Control Flow indicated by a solid line with an arrow showing the direction of activity progression.
Join symbol explained, combining two concurrent activities back into a single flow.
Fork symbol described, splitting a single activity flow into two concurrent activities.
Decision Symbol and Conditions explained with a diamond shape and condition text for mutually exclusive options.
Merge Node's function, similar to Join, merging two activities with a condition.
Final Flow node's distinction from the Final Activity node, signifying the end of a specific process flow.
Partition or Swim lanes in Activity Diagrams to represent actions by different actors in a single thread.
Note or Comment notation used for adding comments to elements in an Activity Diagram.
Additional notations such as Signal Sending and Signal Receipt in Activity Diagrams.
Case study example of a library system illustrating the use of Activity Diagram notations.
Stepwise explanation of drawing an Activity Diagram for the library system case study.
Invitation for questions, comments, and subscription to the Master2Teach YouTube channel.
Closing remarks and an invitation to visit the Master2Teach website for more IT tutorials and guides.
Transcripts
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.
Weitere Àhnliche Videos ansehen
Azure Data Factory Part 5 - Types of Data Pipeline Activities
GCSE Physics - Intro to circuits #14
What is DFD ? Full Explained With Example Library Management System DFD | Don't Miss
TOPCIT Software | 05. Software Requirements Analysis
If/Elif/Else Statement Chain | Godot GDScript Tutorial | Ep 06
How to Draw a Bohr Diagram | Chemistry Homework in 3 MINUTES
5.0 / 5 (0 votes)