SlideShare a Scribd company logo
1 of 43
Download to read offline
Session 07: Diagram
R2S Academy – Internal Use – Author: TUAN NGO
Table of Content
UML
Activity Diagram
Use Case Diagram
R2S Academy – Internal Use – Author: TUAN NGO
1
2
3
Objectives
Unified Modeling Language
(UML)
Diagrams
Unified Modeling Language
ü UML is to define a standard way to visualize the
the behavior and structure of a system
ü First introduced in Jan 1997
UML diagrams types:
ü Structural Diagrams – Capture the static structure of
the system using objects, attributes, operations and
relationships
ü Behavior Diagrams – Capture the dynamic behavior
of the system by showing collaborations among
objects and changes to the internal states of objects
Diagram
UML - Definition
Diagram
UML Diagram Types
% of methods using specific UML diagram type
Ref: https://www.researchgate.net/publication/320709806_Topological_UML_Modeling_An_Improved_Approach_for_Domain_Modeling_and_Software_Development
Activity diagram
Diagram
UML Diagram Types
State Machine Diagram
(Biểu đồ trạng thái)
Diagram
UML Diagram Types
Use Case Diagram
Diagram
UML Diagram Types
Sequence Diagram
Diagram
UML Diagram Types
Class Diagram
Diagram
UML Diagram Types
Deployment Diagram
Diagram
UML Diagram Types
Package Diagram
Diagram
UML Diagram Types
Activity Diagram
Diagrams
Activity Diagram
Definition
When to Use Activity Diagram
ü Model software elements: methods, operations and functions
ü Present concurrent activities in the system
ü Show the constraints, conditions and logic behind algorithms
ü Model in detail complex activities in a high level
Types:
ü Swimlane Activity Diagram – group activities performed by the same
actor in a single thread
ü Non-Swimlane Activity Diagram – representing the flow of interaction
from one activity to another
Note: Swimlane Activity Diagram = Business Process Model and Notation (BPMN)
Activity Diagram
Notations / Symbols
Symbols:
ü Start: Beginning of a set of actions or activities
ü End / Terminator: Stop all flows in an activity (or action)
ü Activity Flow: Shows the sequence of execution
ü Action / Activity: A task to be performed
ü Fork: Split behavior into a set of parallel or concurrent flows
ü Join: Bring back together a set of parallel or concurrent flows
ü Decision: Represent a test condition to ensure that the control
flow or object flow only goes down one path
ü Swimlane / Partition: Group activities performed by the same
actor on an activity diagram or to group activities in a single thread
Activity Diagram
Non-Swimlane Diagram
How to draw Non-Swimlane Diagram:
ü Step 1: Finding all system Activities
ü Step 2: Identifying key scenarios of system use cases
ü Step 3: Combining the scenarios to produce comprehensive
workflows described using activity diagrams
ü Step 4: Where significant object behavior is triggered by a
workflow, adding object flows to the diagrams
ü Step 5: Refining complicated high level activities similarly,
nested activity diagrams
Activity Diagram
Swimlane Diagram
How to draw Swimlane Diagram:
ü Step 1: Figure out the action steps from the use case. Identify:
§ Various activities
§ Your business process actions
ü Step 2: Identify the actors who are involved
§ Figure out who the actors are
§ Define each action they are responsible for
ü Step 3: Find a flow among the activities
§ Figure out in which order the actions are processed
§ Mark down the conditions that have to be met
§ Which actions occur at the same time?
ü Step 4: Add swimlanes
§ Assign each action to a swimlane and group
§ Connect the activities by flow in the diagram
Activity Diagram
Example 1 – Student Enrollment
Student enrollment in a university:
ü An applicant wants to enroll in the university
ü The applicant hands a filled out copy of Enrollment Form
ü The registrar inspects the forms
ü The registrar determines that the forms have been filled out properly
ü The registrar informs student to attend in university overview presentation
ü The registrar helps the student to enroll in seminars
ü The registrar asks the student to pay for the initial tuition
Activity Diagram
Example 1 – Student Enrollment
Student Enrollment – Non-Swimlane Diagram
Activity Diagram
Example 1 – Student Enrollment
Student Enrollment – Swimlane Diagram
Client Meeting Process:
ü Sales person wants to make an appointment with Consultant
ü Sale person needs to call Consultant to setup a meeting
ü A meeting can be at the office (onsite) or remote meeting (offside)
ü Onsite meeting will be held in a meeting room of Sale person’s company
ü Offsite meeting required a laptop available from the Consultant
ü A follow-up email will be provided by the Sales person after the appointment
ü The Consultant reviews and provides a proposal if the business needs improvements
Activity Diagram
Example 2 – Client Meeting Process
Activity Diagram
Example 2 – Client Meeting Process
Client Meeting Process – Non-Swimlane Diagram
Activity Diagram
Example 2 – Client Meeting Process
Client Meeting Process – Swimlane Diagram
Activity Diagram
Practice
Activity Diagram Practice
ü Non-Swimlane Diagram
ü Swimlane Diagram
ü Tool: https://app.diagrams.net/
Use Case Diagram
Diagrams
Use Case Diagram
Definition
Use case diagram
ü Uses a set of specialized symbols and connectors
ü Summarizes details of your system’s users (actors) and their
interactions with the system
ü Describe the ‘what’ of a system and no ‘how’
Present:
ü Scenarios in which your system or application interacts with people,
organizations, or external systems
ü Goals that your system or application helps those entities (known as
actors) achieve
ü Modeling the basic flow of events in a use case
ü The scope of your system
Use Case Diagram
Notations / Symbols
1. Actor
ü Stick figures that represent the people actually employing
the use cases
ü An actor can be: Human, System/ Software, Hardware,
Timer/ Clock
ü Note: Actor represents a role that a user can play but not a
specific user.
§ For example: in a hospital information system (HIS):
§ Actors: doctor and patient as actors
§ Dr. John, Mrs. Brown not actors
Use Case Diagram
Notations / Symbols
2. Use Case
ü Horizontally shaped ovals that represent the different uses
that a user might have
ü Represents a user goal that can be achieved
ü You can create a sub-sequence diagram under a use case
Use Case Diagram
Notations / Symbols
3. Relationship
ü Association: A line between actors and use cases represents
which actors are associated with which use cases
ü Include: defines that a use case contains the behavior
defined in another use case
ü Extend: specifies that the behavior of a use case may be
extended by the behavior of another use case
ü Generalization: represent inheritance relationship between
model elements of same type
Association Include Extend Generalization
Use Case Diagram
Notations / Symbols
4. System
ü The scope of a system can be represented by a
system (shape), or sometimes known as a system
boundary
ü The use cases of the system are placed inside the
system shape
ü The actor who interact with the system are put
outside the system.
ü The use cases in the system make up the total
requirements of the system
Use Case Diagram
Practice
Use Case Diagram Practice
ü Create a use case diagram
ü Tool: https://app.diagrams.net/
Use Case Diagram
Homework
Create use case diagrams
ü Create below use case diagrams
ü Tool: https://app.diagrams.net/
Exercise #1 Exercise #2
What use cases include?
ü Who is using the system
ü What the user wants to do
ü The user's goal
ü The steps the user takes to accomplish a particular task
What use cases Do NOT include?
ü Implementation-specific language
ü Details about the user interfaces or screens
Use Case Diagram
How to create a use case
Steps to develop a Use Case Diagram:
ü Step 1: Identify who is going to be using the system
ü Step 2: Pick one of those users
ü Step 3: Define what that user wants to do on the system. Each thing the use does on the site becomes a use case
ü Step 4: For each use case, decide the normal events that user is using
ü Step 5: Describe the basic description for the use case in terms of what the user does and what the system does
ü Step 6: Consider alternate events and add those to "extend" the use case
ü Step 7: Look for commonalities among the use cases. Extract these and note them as common course use cases
ü Step 8: Repeat the steps 2 through 7 for all other users
Use Case Diagram
How to create a use case
Mistakes in creating use case (1)
Use Case Diagram
Practice
Mistakes in creating use case (2)
Use Case Diagram
Practice
Mistakes in creating use case (3)
Use Case Diagram
Practice
Mistakes in creating use case (4)
Use Case Diagram
Practice
Mistakes in creating use case (5)
Use Case Diagram
Practice
Mistakes in creating use case (6)
Use Case Diagram
Practice
Mistakes in creating use case (7)
Use Case Diagram
Practice
Review
Diagrams
3. Homework:
ü Create 2 use case diagrams using draw.io tool
ü Questions?
Diagrams
Review
1. Activity Diagram
ü Differences between Swimlane vs Non-Swimlane Diagram?
ü Symbols of activity diagram?
2. Use Case Diagram
ü What can be actors of a use case diagram?
ü What’s wrong from the below use case diagram?

More Related Content

Similar to Session07-Diagram.pdf

conversion-gate02.pptx
conversion-gate02.pptxconversion-gate02.pptx
conversion-gate02.pptxNouraBaccar1
 
SELECT21.pptx
SELECT21.pptxSELECT21.pptx
SELECT21.pptxdevnasra1
 
Software Engineering-Unit 3 "System Modelling" by Adi.pdf
Software Engineering-Unit 3 "System Modelling" by Adi.pdfSoftware Engineering-Unit 3 "System Modelling" by Adi.pdf
Software Engineering-Unit 3 "System Modelling" by Adi.pdfProf. Dr. K. Adisesha
 
OOAD U1.pptx
OOAD U1.pptxOOAD U1.pptx
OOAD U1.pptxanguraju1
 
Lecture no 8 use case modeling and use case diagrams
Lecture no 8 use case modeling and use case diagramsLecture no 8 use case modeling and use case diagrams
Lecture no 8 use case modeling and use case diagramsnaveed428
 
Placement management system
Placement management systemPlacement management system
Placement management systemSurya Teja
 
Workshop on Basics of Software Engineering (DFD, UML and Project Culture)
Workshop on Basics of Software Engineering (DFD, UML and Project Culture)Workshop on Basics of Software Engineering (DFD, UML and Project Culture)
Workshop on Basics of Software Engineering (DFD, UML and Project Culture)Dr Sukhpal Singh Gill
 
SE_RE-II-CH5 (3).pdf
SE_RE-II-CH5 (3).pdfSE_RE-II-CH5 (3).pdf
SE_RE-II-CH5 (3).pdfAZKANAAZ1
 
Use case Diagram
Use case Diagram Use case Diagram
Use case Diagram Rahul Pola
 

Similar to Session07-Diagram.pdf (20)

BasicUseCases 02.ppt
BasicUseCases 02.pptBasicUseCases 02.ppt
BasicUseCases 02.ppt
 
How to write use cases
How to write use casesHow to write use cases
How to write use cases
 
conversion-gate02.pptx
conversion-gate02.pptxconversion-gate02.pptx
conversion-gate02.pptx
 
SELECT21.pptx
SELECT21.pptxSELECT21.pptx
SELECT21.pptx
 
2.1 usecase diagram
2.1 usecase diagram2.1 usecase diagram
2.1 usecase diagram
 
Software Engineering-Unit 3 "System Modelling" by Adi.pdf
Software Engineering-Unit 3 "System Modelling" by Adi.pdfSoftware Engineering-Unit 3 "System Modelling" by Adi.pdf
Software Engineering-Unit 3 "System Modelling" by Adi.pdf
 
Use case diagram
Use case diagramUse case diagram
Use case diagram
 
Use Case approach
Use Case approachUse Case approach
Use Case approach
 
Uml
UmlUml
Uml
 
Use case modeling
Use case modelingUse case modeling
Use case modeling
 
OOAD U1.pptx
OOAD U1.pptxOOAD U1.pptx
OOAD U1.pptx
 
Lecture no 8 use case modeling and use case diagrams
Lecture no 8 use case modeling and use case diagramsLecture no 8 use case modeling and use case diagrams
Lecture no 8 use case modeling and use case diagrams
 
Lec-9.ppt
Lec-9.pptLec-9.ppt
Lec-9.ppt
 
Defining The System
Defining The SystemDefining The System
Defining The System
 
Placement management system
Placement management systemPlacement management system
Placement management system
 
Workshop on Basics of Software Engineering (DFD, UML and Project Culture)
Workshop on Basics of Software Engineering (DFD, UML and Project Culture)Workshop on Basics of Software Engineering (DFD, UML and Project Culture)
Workshop on Basics of Software Engineering (DFD, UML and Project Culture)
 
SE_RE-II-CH5 (3).pdf
SE_RE-II-CH5 (3).pdfSE_RE-II-CH5 (3).pdf
SE_RE-II-CH5 (3).pdf
 
Use case Diagram
Use case Diagram Use case Diagram
Use case Diagram
 
Use case diagrams
Use case diagramsUse case diagrams
Use case diagrams
 
Use case diagrams
Use case diagramsUse case diagrams
Use case diagrams
 

More from PeterTran514407

Session17-Software Testing.pdf
Session17-Software Testing.pdfSession17-Software Testing.pdf
Session17-Software Testing.pdfPeterTran514407
 
Session13-Class Diagram (1).pdf
Session13-Class Diagram (1).pdfSession13-Class Diagram (1).pdf
Session13-Class Diagram (1).pdfPeterTran514407
 
Session03-Requirement (1).pdf
Session03-Requirement (1).pdfSession03-Requirement (1).pdf
Session03-Requirement (1).pdfPeterTran514407
 
Session15+16-User Story (2).pdf
Session15+16-User Story (2).pdfSession15+16-User Story (2).pdf
Session15+16-User Story (2).pdfPeterTran514407
 
Session01-BA Introduction.pdf
Session01-BA Introduction.pdfSession01-BA Introduction.pdf
Session01-BA Introduction.pdfPeterTran514407
 

More from PeterTran514407 (6)

Session17-Software Testing.pdf
Session17-Software Testing.pdfSession17-Software Testing.pdf
Session17-Software Testing.pdf
 
Session13-Class Diagram (1).pdf
Session13-Class Diagram (1).pdfSession13-Class Diagram (1).pdf
Session13-Class Diagram (1).pdf
 
Session03-Requirement (1).pdf
Session03-Requirement (1).pdfSession03-Requirement (1).pdf
Session03-Requirement (1).pdf
 
bdd-190104042740.pdf
bdd-190104042740.pdfbdd-190104042740.pdf
bdd-190104042740.pdf
 
Session15+16-User Story (2).pdf
Session15+16-User Story (2).pdfSession15+16-User Story (2).pdf
Session15+16-User Story (2).pdf
 
Session01-BA Introduction.pdf
Session01-BA Introduction.pdfSession01-BA Introduction.pdf
Session01-BA Introduction.pdf
 

Recently uploaded

Teachers record management system project report..pdf
Teachers record management system project report..pdfTeachers record management system project report..pdf
Teachers record management system project report..pdfKamal Acharya
 
Research Methodolgy & Intellectual Property Rights Series 1
Research Methodolgy & Intellectual Property Rights Series 1Research Methodolgy & Intellectual Property Rights Series 1
Research Methodolgy & Intellectual Property Rights Series 1T.D. Shashikala
 
Lect 2 - Design of slender column-2.pptx
Lect 2 - Design of slender column-2.pptxLect 2 - Design of slender column-2.pptx
Lect 2 - Design of slender column-2.pptxHamzaKhawar4
 
E-Commerce Shopping for developing a shopping ecommerce site
E-Commerce Shopping for developing a shopping ecommerce siteE-Commerce Shopping for developing a shopping ecommerce site
E-Commerce Shopping for developing a shopping ecommerce sitejatinraor66
 
An improvement in the safety of big data using blockchain technology
An improvement in the safety of big data using blockchain technologyAn improvement in the safety of big data using blockchain technology
An improvement in the safety of big data using blockchain technologyBOHRInternationalJou1
 
Online book store management system project.pdf
Online book store management system project.pdfOnline book store management system project.pdf
Online book store management system project.pdfKamal Acharya
 
DR PROF ING GURUDUTT SAHNI WIKIPEDIA.pdf
DR PROF ING GURUDUTT SAHNI WIKIPEDIA.pdfDR PROF ING GURUDUTT SAHNI WIKIPEDIA.pdf
DR PROF ING GURUDUTT SAHNI WIKIPEDIA.pdfDrGurudutt
 
Paint shop management system project report.pdf
Paint shop management system project report.pdfPaint shop management system project report.pdf
Paint shop management system project report.pdfKamal Acharya
 
Electrical shop management system project report.pdf
Electrical shop management system project report.pdfElectrical shop management system project report.pdf
Electrical shop management system project report.pdfKamal Acharya
 
ONLINE CAR SERVICING SYSTEM PROJECT REPORT.pdf
ONLINE CAR SERVICING SYSTEM PROJECT REPORT.pdfONLINE CAR SERVICING SYSTEM PROJECT REPORT.pdf
ONLINE CAR SERVICING SYSTEM PROJECT REPORT.pdfKamal Acharya
 
KIT-601 Lecture Notes-UNIT-5.pdf Frame Works and Visualization
KIT-601 Lecture Notes-UNIT-5.pdf Frame Works and VisualizationKIT-601 Lecture Notes-UNIT-5.pdf Frame Works and Visualization
KIT-601 Lecture Notes-UNIT-5.pdf Frame Works and VisualizationDr. Radhey Shyam
 
ENCODERS & DECODERS - Digital Electronics - diu swe
ENCODERS & DECODERS - Digital Electronics - diu sweENCODERS & DECODERS - Digital Electronics - diu swe
ENCODERS & DECODERS - Digital Electronics - diu sweMohammadAliNayeem
 
一比一原版(UNK毕业证)内布拉斯加州立大学科尼分校毕业证成绩单
一比一原版(UNK毕业证)内布拉斯加州立大学科尼分校毕业证成绩单一比一原版(UNK毕业证)内布拉斯加州立大学科尼分校毕业证成绩单
一比一原版(UNK毕业证)内布拉斯加州立大学科尼分校毕业证成绩单tuuww
 
Cloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptx
Cloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptxCloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptx
Cloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptxMd. Shahidul Islam Prodhan
 
Natalia Rutkowska - BIM School Course in Kraków
Natalia Rutkowska - BIM School Course in KrakówNatalia Rutkowska - BIM School Course in Kraków
Natalia Rutkowska - BIM School Course in Krakówbim.edu.pl
 
Top 13 Famous Civil Engineering Scientist
Top 13 Famous Civil Engineering ScientistTop 13 Famous Civil Engineering Scientist
Top 13 Famous Civil Engineering Scientistgettygaming1
 
2024 DevOps Pro Europe - Growing at the edge
2024 DevOps Pro Europe - Growing at the edge2024 DevOps Pro Europe - Growing at the edge
2024 DevOps Pro Europe - Growing at the edgePaco Orozco
 
Dairy management system project report..pdf
Dairy management system project report..pdfDairy management system project report..pdf
Dairy management system project report..pdfKamal Acharya
 
Online resume builder management system project report.pdf
Online resume builder management system project report.pdfOnline resume builder management system project report.pdf
Online resume builder management system project report.pdfKamal Acharya
 
"United Nations Park" Site Visit Report.
"United Nations Park" Site  Visit Report."United Nations Park" Site  Visit Report.
"United Nations Park" Site Visit Report.MdManikurRahman
 

Recently uploaded (20)

Teachers record management system project report..pdf
Teachers record management system project report..pdfTeachers record management system project report..pdf
Teachers record management system project report..pdf
 
Research Methodolgy & Intellectual Property Rights Series 1
Research Methodolgy & Intellectual Property Rights Series 1Research Methodolgy & Intellectual Property Rights Series 1
Research Methodolgy & Intellectual Property Rights Series 1
 
Lect 2 - Design of slender column-2.pptx
Lect 2 - Design of slender column-2.pptxLect 2 - Design of slender column-2.pptx
Lect 2 - Design of slender column-2.pptx
 
E-Commerce Shopping for developing a shopping ecommerce site
E-Commerce Shopping for developing a shopping ecommerce siteE-Commerce Shopping for developing a shopping ecommerce site
E-Commerce Shopping for developing a shopping ecommerce site
 
An improvement in the safety of big data using blockchain technology
An improvement in the safety of big data using blockchain technologyAn improvement in the safety of big data using blockchain technology
An improvement in the safety of big data using blockchain technology
 
Online book store management system project.pdf
Online book store management system project.pdfOnline book store management system project.pdf
Online book store management system project.pdf
 
DR PROF ING GURUDUTT SAHNI WIKIPEDIA.pdf
DR PROF ING GURUDUTT SAHNI WIKIPEDIA.pdfDR PROF ING GURUDUTT SAHNI WIKIPEDIA.pdf
DR PROF ING GURUDUTT SAHNI WIKIPEDIA.pdf
 
Paint shop management system project report.pdf
Paint shop management system project report.pdfPaint shop management system project report.pdf
Paint shop management system project report.pdf
 
Electrical shop management system project report.pdf
Electrical shop management system project report.pdfElectrical shop management system project report.pdf
Electrical shop management system project report.pdf
 
ONLINE CAR SERVICING SYSTEM PROJECT REPORT.pdf
ONLINE CAR SERVICING SYSTEM PROJECT REPORT.pdfONLINE CAR SERVICING SYSTEM PROJECT REPORT.pdf
ONLINE CAR SERVICING SYSTEM PROJECT REPORT.pdf
 
KIT-601 Lecture Notes-UNIT-5.pdf Frame Works and Visualization
KIT-601 Lecture Notes-UNIT-5.pdf Frame Works and VisualizationKIT-601 Lecture Notes-UNIT-5.pdf Frame Works and Visualization
KIT-601 Lecture Notes-UNIT-5.pdf Frame Works and Visualization
 
ENCODERS & DECODERS - Digital Electronics - diu swe
ENCODERS & DECODERS - Digital Electronics - diu sweENCODERS & DECODERS - Digital Electronics - diu swe
ENCODERS & DECODERS - Digital Electronics - diu swe
 
一比一原版(UNK毕业证)内布拉斯加州立大学科尼分校毕业证成绩单
一比一原版(UNK毕业证)内布拉斯加州立大学科尼分校毕业证成绩单一比一原版(UNK毕业证)内布拉斯加州立大学科尼分校毕业证成绩单
一比一原版(UNK毕业证)内布拉斯加州立大学科尼分校毕业证成绩单
 
Cloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptx
Cloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptxCloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptx
Cloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptx
 
Natalia Rutkowska - BIM School Course in Kraków
Natalia Rutkowska - BIM School Course in KrakówNatalia Rutkowska - BIM School Course in Kraków
Natalia Rutkowska - BIM School Course in Kraków
 
Top 13 Famous Civil Engineering Scientist
Top 13 Famous Civil Engineering ScientistTop 13 Famous Civil Engineering Scientist
Top 13 Famous Civil Engineering Scientist
 
2024 DevOps Pro Europe - Growing at the edge
2024 DevOps Pro Europe - Growing at the edge2024 DevOps Pro Europe - Growing at the edge
2024 DevOps Pro Europe - Growing at the edge
 
Dairy management system project report..pdf
Dairy management system project report..pdfDairy management system project report..pdf
Dairy management system project report..pdf
 
Online resume builder management system project report.pdf
Online resume builder management system project report.pdfOnline resume builder management system project report.pdf
Online resume builder management system project report.pdf
 
"United Nations Park" Site Visit Report.
"United Nations Park" Site  Visit Report."United Nations Park" Site  Visit Report.
"United Nations Park" Site Visit Report.
 

Session07-Diagram.pdf

  • 1. Session 07: Diagram R2S Academy – Internal Use – Author: TUAN NGO
  • 2. Table of Content UML Activity Diagram Use Case Diagram R2S Academy – Internal Use – Author: TUAN NGO 1 2 3 Objectives
  • 4. Unified Modeling Language ü UML is to define a standard way to visualize the the behavior and structure of a system ü First introduced in Jan 1997 UML diagrams types: ü Structural Diagrams – Capture the static structure of the system using objects, attributes, operations and relationships ü Behavior Diagrams – Capture the dynamic behavior of the system by showing collaborations among objects and changes to the internal states of objects Diagram UML - Definition
  • 5. Diagram UML Diagram Types % of methods using specific UML diagram type Ref: https://www.researchgate.net/publication/320709806_Topological_UML_Modeling_An_Improved_Approach_for_Domain_Modeling_and_Software_Development
  • 7. State Machine Diagram (Biểu đồ trạng thái) Diagram UML Diagram Types
  • 14. Activity Diagram Definition When to Use Activity Diagram ü Model software elements: methods, operations and functions ü Present concurrent activities in the system ü Show the constraints, conditions and logic behind algorithms ü Model in detail complex activities in a high level Types: ü Swimlane Activity Diagram – group activities performed by the same actor in a single thread ü Non-Swimlane Activity Diagram – representing the flow of interaction from one activity to another Note: Swimlane Activity Diagram = Business Process Model and Notation (BPMN)
  • 15. Activity Diagram Notations / Symbols Symbols: ü Start: Beginning of a set of actions or activities ü End / Terminator: Stop all flows in an activity (or action) ü Activity Flow: Shows the sequence of execution ü Action / Activity: A task to be performed ü Fork: Split behavior into a set of parallel or concurrent flows ü Join: Bring back together a set of parallel or concurrent flows ü Decision: Represent a test condition to ensure that the control flow or object flow only goes down one path ü Swimlane / Partition: Group activities performed by the same actor on an activity diagram or to group activities in a single thread
  • 16. Activity Diagram Non-Swimlane Diagram How to draw Non-Swimlane Diagram: ü Step 1: Finding all system Activities ü Step 2: Identifying key scenarios of system use cases ü Step 3: Combining the scenarios to produce comprehensive workflows described using activity diagrams ü Step 4: Where significant object behavior is triggered by a workflow, adding object flows to the diagrams ü Step 5: Refining complicated high level activities similarly, nested activity diagrams
  • 17. Activity Diagram Swimlane Diagram How to draw Swimlane Diagram: ü Step 1: Figure out the action steps from the use case. Identify: § Various activities § Your business process actions ü Step 2: Identify the actors who are involved § Figure out who the actors are § Define each action they are responsible for ü Step 3: Find a flow among the activities § Figure out in which order the actions are processed § Mark down the conditions that have to be met § Which actions occur at the same time? ü Step 4: Add swimlanes § Assign each action to a swimlane and group § Connect the activities by flow in the diagram
  • 18. Activity Diagram Example 1 – Student Enrollment Student enrollment in a university: ü An applicant wants to enroll in the university ü The applicant hands a filled out copy of Enrollment Form ü The registrar inspects the forms ü The registrar determines that the forms have been filled out properly ü The registrar informs student to attend in university overview presentation ü The registrar helps the student to enroll in seminars ü The registrar asks the student to pay for the initial tuition
  • 19. Activity Diagram Example 1 – Student Enrollment Student Enrollment – Non-Swimlane Diagram
  • 20. Activity Diagram Example 1 – Student Enrollment Student Enrollment – Swimlane Diagram
  • 21. Client Meeting Process: ü Sales person wants to make an appointment with Consultant ü Sale person needs to call Consultant to setup a meeting ü A meeting can be at the office (onsite) or remote meeting (offside) ü Onsite meeting will be held in a meeting room of Sale person’s company ü Offsite meeting required a laptop available from the Consultant ü A follow-up email will be provided by the Sales person after the appointment ü The Consultant reviews and provides a proposal if the business needs improvements Activity Diagram Example 2 – Client Meeting Process
  • 22. Activity Diagram Example 2 – Client Meeting Process Client Meeting Process – Non-Swimlane Diagram
  • 23. Activity Diagram Example 2 – Client Meeting Process Client Meeting Process – Swimlane Diagram
  • 24. Activity Diagram Practice Activity Diagram Practice ü Non-Swimlane Diagram ü Swimlane Diagram ü Tool: https://app.diagrams.net/
  • 26. Use Case Diagram Definition Use case diagram ü Uses a set of specialized symbols and connectors ü Summarizes details of your system’s users (actors) and their interactions with the system ü Describe the ‘what’ of a system and no ‘how’ Present: ü Scenarios in which your system or application interacts with people, organizations, or external systems ü Goals that your system or application helps those entities (known as actors) achieve ü Modeling the basic flow of events in a use case ü The scope of your system
  • 27. Use Case Diagram Notations / Symbols 1. Actor ü Stick figures that represent the people actually employing the use cases ü An actor can be: Human, System/ Software, Hardware, Timer/ Clock ü Note: Actor represents a role that a user can play but not a specific user. § For example: in a hospital information system (HIS): § Actors: doctor and patient as actors § Dr. John, Mrs. Brown not actors
  • 28. Use Case Diagram Notations / Symbols 2. Use Case ü Horizontally shaped ovals that represent the different uses that a user might have ü Represents a user goal that can be achieved ü You can create a sub-sequence diagram under a use case
  • 29. Use Case Diagram Notations / Symbols 3. Relationship ü Association: A line between actors and use cases represents which actors are associated with which use cases ü Include: defines that a use case contains the behavior defined in another use case ü Extend: specifies that the behavior of a use case may be extended by the behavior of another use case ü Generalization: represent inheritance relationship between model elements of same type Association Include Extend Generalization
  • 30. Use Case Diagram Notations / Symbols 4. System ü The scope of a system can be represented by a system (shape), or sometimes known as a system boundary ü The use cases of the system are placed inside the system shape ü The actor who interact with the system are put outside the system. ü The use cases in the system make up the total requirements of the system
  • 31. Use Case Diagram Practice Use Case Diagram Practice ü Create a use case diagram ü Tool: https://app.diagrams.net/
  • 32. Use Case Diagram Homework Create use case diagrams ü Create below use case diagrams ü Tool: https://app.diagrams.net/ Exercise #1 Exercise #2
  • 33. What use cases include? ü Who is using the system ü What the user wants to do ü The user's goal ü The steps the user takes to accomplish a particular task What use cases Do NOT include? ü Implementation-specific language ü Details about the user interfaces or screens Use Case Diagram How to create a use case
  • 34. Steps to develop a Use Case Diagram: ü Step 1: Identify who is going to be using the system ü Step 2: Pick one of those users ü Step 3: Define what that user wants to do on the system. Each thing the use does on the site becomes a use case ü Step 4: For each use case, decide the normal events that user is using ü Step 5: Describe the basic description for the use case in terms of what the user does and what the system does ü Step 6: Consider alternate events and add those to "extend" the use case ü Step 7: Look for commonalities among the use cases. Extract these and note them as common course use cases ü Step 8: Repeat the steps 2 through 7 for all other users Use Case Diagram How to create a use case
  • 35. Mistakes in creating use case (1) Use Case Diagram Practice
  • 36. Mistakes in creating use case (2) Use Case Diagram Practice
  • 37. Mistakes in creating use case (3) Use Case Diagram Practice
  • 38. Mistakes in creating use case (4) Use Case Diagram Practice
  • 39. Mistakes in creating use case (5) Use Case Diagram Practice
  • 40. Mistakes in creating use case (6) Use Case Diagram Practice
  • 41. Mistakes in creating use case (7) Use Case Diagram Practice
  • 43. 3. Homework: ü Create 2 use case diagrams using draw.io tool ü Questions? Diagrams Review 1. Activity Diagram ü Differences between Swimlane vs Non-Swimlane Diagram? ü Symbols of activity diagram? 2. Use Case Diagram ü What can be actors of a use case diagram? ü What’s wrong from the below use case diagram?