Activity Diagram - Step by Step Guide with Example

Master2Teach
30 Apr 202007:39

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

00:00

📚 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.

05:04

🔍 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

An Activity Diagram is a type of Unified Modeling Language (UML) diagram that provides a visual representation of the workflow of a system. It shows the sequence of activities and the flow of control from one activity to another. In the video, the Activity Diagram is central to explaining how systems operate dynamically, with examples given to illustrate its practical application in scenarios like an online flight reservation system.

💡UML

UML stands for Unified Modeling Language, which is a standardized modeling language used in software engineering to create diagrams that represent various aspects of a system. The video script discusses the Activity Diagram as one of the important diagrams in UML, highlighting its role in depicting the dynamic view of a system's operations.

💡Control Flow

Control Flow in an Activity Diagram refers to the path that is taken through the activities based on the conditions and decisions made within the system. The script uses the term to describe how activities are connected in a sequence, with a solid line and arrow indicating the direction of the flow, such as from one operation to another.

💡Start Node

The Start Node is a notation used in Activity Diagrams to represent the initial state before any activity begins. It is depicted as a small filled circle, and in the script, it is explained as the beginning of an activity, setting the stage for the subsequent workflow.

💡Final Activity Node

The Final Activity Node is a symbol that denotes the end state of an activity within an Activity Diagram. It is represented by a black circle with a border that resembles a selected radio button. The script mentions it as a way to signify the conclusion of a particular activity in the system.

💡Activity

In the context of an Activity Diagram, an Activity represents a specific action or operation within the system. It is typically shown as an oval or a round-edged rectangle with a short description. The script explains activities as the basic building blocks of the diagram, giving examples of how they are depicted and connected.

💡Fork

A Fork in an Activity Diagram is a control structure that splits a single activity flow into two or more concurrent activities. The script uses the example of an online flight reservation system to illustrate how a fork can represent activities like searching for availability and entering personal details happening at the same time.

💡Join

A Join in an Activity Diagram is the counterpart to a Fork, combining multiple concurrent activity flows back into a single flow. The script explains that a join is used when the concurrent activities need to be merged back into the main flow, such as after searching for a flight and entering personal details.

💡Decision Symbol

The Decision Symbol in an Activity Diagram is represented by a diamond shape and is used to show a point in the workflow where a decision is made, leading to different paths based on conditions. The script describes it as similar to a flowchart, with the condition text specifying the mutually exclusive options.

💡Merge Node

A Merge Node in an Activity Diagram is similar to a Join but is used when two or more activities are merged based on a condition, with only one activity continuing forward. The script provides an example of sending an email, where the merge node represents the decision to either encrypt the email or send it as regular mail.

💡Partition

A Partition, also known as swim lanes in Activity Diagrams, is used to group or represent actions carried out by different actors within a single thread of the system. The script explains that partitions help in organizing the diagram by showing which activities are performed by which actors.

💡Note or Comment

In the context of UML diagrams, including Activity Diagrams, a Note or Comment is used to add relevant information or clarification to elements within the diagram. The script describes it as a symbol with one corner folded, providing additional context or explanation for the activities depicted.

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

play00:12

Hello Everyone  Welcomes to Master2Teach Step by Step Guide

play00:18

In this video, you’re going to learn

play00:21

What is the Activity Diagram?

play00:23

How to draw an activity diagram?

play00:24

We will see each notation one by one.

play00:27

We will learn step by step with examples.

play00:29

I will try my best to explain step by step.

play00:33

If you haven’t subscribed to our channel, please click on the subscribe button and subscribe

play00:37

to our YouTube channel.

play00:38

Ok let’s start.

play00:40

What is the Activity Diagram?

play00:41

One of the other important diagrams in UML

play00:44

is the Activity Diagram which shows a dynamic view of the system.

play00:48

The activity diagram is a flowchart to represent the flow of control among the activities in

play00:53

a system.

play00:54

Simply, it’s an operation of the system shown in the diagrammatical form where it

play00:58

shows all the control flow from one operation to another.

play01:02

So far we have gone through the use case diagram,

play01:05

communication, sequence, and class diagram which shows the message flow from one object

play01:09

to another but in the activity diagram shows the message flow from one activity to another.

play01:15

If you haven’t gone through the previous

play01:16

video, you can find the link in the description of this video below.

play01:20

The flow of operation can be sequential, branched

play01:23

or concurrent.

play01:25

The activity diagram is sometimes considered as the flowchart.

play01:28

Although the diagrams look like a flowchart, but they are not.

play01:32

Now let’s move to learn different notations used in the activity diagram.

play01:36

1.

play01:37

Start Node: The black small filled circle is the standard notation for an initial state

play01:43

before an activity takes place.

play01:45

In the flow chart we draw in an oval shape label with Start whereas in the activity diagram

play01:51

we draw with fill small circle as shown in the diagram to represent the start of the

play01:56

activity.

play01:57

2.

play01:58

Final Activity node: The Black circle that looks like a selected radio button is the

play02:02

symbol for the end state of activity.

play02:04

In the flow chart we represent in oval shape label with the end in it whereas in the activity

play02:10

diagram we represent with small fill circle include borderline circle as shown in the

play02:15

figure.

play02:16

3.

play02:17

Activity: The activity symbols are the basic building blocks of an activity diagram and

play02:22

usually have a short description of the activity they represent.

play02:26

It is represented by the oval shape as well as a round-edged rectangle box as shown in

play02:31

the figure.

play02:32

4.

play02:34

Control Flow: A solid line with an arrow represent the direction flow of the activities.

play02:39

The arrow points in the direction of progressing activities.

play02:42

5.

play02:43

Join: A join combines two concurrent activities back into a flow where only one activity is

play02:50

happening at a time which is represented as shown in the figure.

play02:54

6.

play02:55

Fork: A fork splits single activity flow into two concurrent activities which are represented

play03:01

as shown in the figure.

play03:03

For example an online flight reservation system  The activity starts and needs to enter arrival

play03:09

and departure dates  After that there needs to perform two activities

play03:13

one search availability whereas another enters personal details which are represented by

play03:18

the fork symbol.

play03:20

Similarly these two activities join together and flow another activity like select flight

play03:26

which can be shown by join symbol as shown in the figure.

play03:28

7.

play03:31

Decision Symbol: It is similar to the flow chart which is represented by the diamond

play03:35

shape where two paths coming out of a decision and the condition text lets you know which

play03:41

options are mutually exclusive.

play03:42

8.

play03:45

Condition: condition text is placed next to a decision marker to let you know under what

play03:53

condition an activity flow should split off in that direction as shown in the figure.

play03:58

9.

play03:59

Merge Node: Merge is similar to the join where two activities are merged with the condition

play04:05

and only one activity flows forward as shown in the figure.

play04:08

For example: While Sending E-mail, if the email is private, encrypted it before sending

play04:13

it while if not private, send as regular mail.

play04:18

These two activities are merged with the merge node which is the same as the decision represented

play04:24

by a diamond shape.

play04:25

In Decision one activity as input and there will be two output according to a condition

play04:30

whereas in merge two activities are input and output only one activity

play04:35

Let’s learn more notations use in the activity diagram.

play04:40

10.

play04:41

Final Flow node: It may be confusing with the final activity node.

play04:45

It represents the end of a specific process flow which is denoted by a circle with cross

play04:50

lines inside the circle.

play04:52

The difference between final activity and final flow-node is that the flow final node

play04:57

denotes the end of a single control flow whereas activity final note denotes the end of all

play05:03

control flows within the activity.

play05:06

11.

play05:07

Partition: activity diagram partition is also known as swim lanes which are used to represent

play05:12

or group actions carried out by different actors in a single thread as shown in the

play05:18

figure.

play05:19

12.

play05:20

Note: or Comment: This is similar to the sequence diagram, used to add relevant comments to

play05:24

elements that are represented by one corner folded symbol as shown in the figure.

play05:29

Beside this notation there are other notations

play05:31

also used like  Signal Sending which is used to represent

play05:36

the action of sending a single to an accepting activity

play05:40

Signal receipt, which is used to represent

play05:43

that signal is received.

play05:44

play05:45

Let’s see an example of Borrow's book in the library system case study.

play05:49

Begin with start note to start the activity

play05:51

– First of all, members need to login to the

play05:54

system, for which we make an activity.

play05:57

There may be two types of member new member and old or register member so we show with

play06:02

the condition is a member or not

play06:04

Now if not a member, follow with registration activity whereas if already a member check

play06:10

if any book needs to return.

play06:12

Again another condition appears, if no, join with the after registration activity using

play06:17

join.

play06:18

If yes, process with another activity which is checking fines.

play06:22

If yes, then process for the collecting fine activity.

play06:26

Join these two activities and follow them for further activities.

play06:29

The next activity is searching now which is for both newly registered members as well

play06:33

as the old one.

play06:35

So join the activity and process for the search book activity.

play06:38

Again condition with found required book or not.

play06:41

If no, search until not found.

play06:43

If the required book is found, process another activity like view book details and request

play06:48

to issue the book and receive a book and finally end with the final activity note.

play06:54

In this way, you can draw the activity diagram

play06:56

using a different kind of notation showing stepwise activities.

play07:00

play07:01

I hope you learned from this video tutorial, if you have any questions or comments please

play07:04

make sure to leave a comment in the comment section below.

play07:08

Also please be sure to like this video and subscribe to my channel if you haven’t already.

play07:12

Thanks very much for watching.

play07:14

Check us out for more in IT tutorial and Guide on website master2teach.com and we’ll see

play07:20

you again soon bye.

Rate This

5.0 / 5 (0 votes)

Связанные теги
UML DiagramsActivity FlowSystem ControlSoftware DesignTutorial GuideDynamic ViewControl NotationFlowchart ComparisonCase StudySoftware Tutorial
Вам нужно краткое изложение на английском?