SlideShare a Scribd company logo
3
Most read
6
Most read
8
Most read
Activity Diagrams Week 4 TID2033
Chapter Objectives After studying this chapter you should be able to: Understand the rules and styles guidelines for activity diagrams. Create functional model using activity diagrams.
What Is an Activity Diagram? Activity diagrams and use cases are logical model which  describe  the business domain’s activities  without suggesting how they are conduct. A diagram that emphasizes the  flow of control  from activity to activity in an object.
What Is an Activity Diagram? (cont…) Similar to the traditional program  flowchart . Used to provide detail for complex algorithms. Portray the primary activities and the relationships among the activities in a process.
Drawing Activity Diagrams Purpose to model a task (for example in business modelling) to describe a function of a system represented by a use case to describe the logic of an operation to model the activities that make up the life cycle in the Unified Process
Elements of an Activity Diagrams Synchronization bar  – horizontal or vertical bars denoting parallel or concurrent paths of activities Decision point  – a diamond symbol containing a condition whose results provide transitions to different paths of activities Transition   – a movement from one activity or state to another Activity   a behavior that an object carries out while in a particular state
Notation of Activity Diagrams Activities rectangle with rounded ends meaningful name Transitions arrows with open arrowheads Fill in registration form Register subject
Notation of Activity Diagrams Start state black circle Decision points diamond Guard conditions in square brackets Final state black circle in white circle [campaign to add] [no campaign to add] Add a New  Client Assign Staff Contact Add New  Campaign
Notation of Activity Diagrams Alternative notation for  branching: alternative transitions  are shown leaving the activity with guard conditions Note that guard conditions do not have to be mutually exclusive, but it is advisable that they should be [campaign to add] [no campaign to add] Add a New  Client Assign Staff Contact Add New  Campaign
Notation of Activity Diagrams Object flows dashed arrow Objects rectangle with name of object underlined optionally shows the state of the object in square brackets Record completion of a campaign :Campaign [Active] :Campaign [Completed]
Notation of Activity Diagrams Swimlanes vertical columns  labelled with the person, organisation or department responsible for the activities in that column Record Completion of a campaign Issue invoice Campaign Manager Client Accountant Pay invoice Record client payment
Activity diagram with synchronization bars Top synchronization bar is a  fork. Bottom synchronization bar is a  join.
Guidelines for Creating Activity Diagrams Set the context or scope of the activity being modeled. Identify the activities, control flows, and object flows that occur between the activities. Identify any decisions that are part of  the process being modeled. Identify any prospects for parallelism in the process. Draw the activity diagram. Scott Ambler
Drawing Activity Diagrams What is the purpose? This will influence the kind of activities that are shown What is being shown in the diagram? What is the name of the business process, use case or operation? What level of detail is required? Is it high level or more detailed?
Drawing Activity Diagrams Identify activities Organise the activities in order with transitions Identify any alternative transitions and the conditions on them Add transitions and guard conditions to the diagram
Drawing Activity Diagrams Identify any processes that are repeated Add transitions and guard conditions to the diagram
Drawing Activity Diagrams Are all the activities carried out by the same person, organisation or department? If not, then add swimlanes to show the responsibilities Name the swimlanes Show each activity in the appropriate swimlane
Drawing Activity Diagrams Are there any object flows and objects to show? these can be documents that are created or updated in a business activity diagram these can be object instances that change state in an operation or a use case Add the object flows and objects
When Not to Use Activity Diagram An activity diagram should be avoided if: The use case is simple and the graphical representation will not be helpful The purpose is to examine how object collaborate – an interaction diagrams should be used instead. The purpose is to see how an object behaves over its lifetime. – used a statechart diagrams instead
Summary In this lecture you have learned about: The purpose of activity diagrams The notation of activity diagrams How to draw activity diagrams
Let’s do the exercise
Dentist Office System Create an activity diagram for the following dentist office system. Whenever new patients are seen for the first time, they complete a patient information form that asks their name, address, phone number and brief medical history, which are stored in the patient information file. When a patient calls to schedule a new appointment or change an existing appointment, the receptionist checks the appointment file for an available time. Once a good time is found for the patient, the appointment is scheduled. If the patient is a new patient, an incomplete entry is made in the patient file; the full information will be collected when they arrive for their appointment. Because appointments are often made so far in advance, the receptionist usually mails a reminder postcard to each patient two weeks before their appointment.
Use case name: Withdraw money The use case is initiated by the customer. Customer inserts the bank-card and enters PIN. ATM SYSTEM authorizes the customer. ATM SYSTEM will eject the card if the authorization is unsuccessful and at the end of every transaction. Then the customer will take the card and leave.  If the authorization is successful, ATM SYSTEM asks customer “how much” and the customer enters the amount and ATM SYSTEM checks if amount <= balance. If yes, customer gets the money and ATM SYSTEM updates balance. (Show two activities – customer getting money and ATM SYSTEM updating the balance as parallel events.) If amount > balance, ATM SYSTEM displays an error message and aborts the current transaction.

More Related Content

PDF
Lecture6 activity diagrams
PPT
Uml Activity Diagram
PPTX
Uml deployment diagram
PDF
Introductory manual for the open source meshing code SALOME
PPSX
Unidad iii modelado de procesos
PPT
Crc cards
PPT
Introduction to design patterns
PDF
Gestalt Principles in UI Design
Lecture6 activity diagrams
Uml Activity Diagram
Uml deployment diagram
Introductory manual for the open source meshing code SALOME
Unidad iii modelado de procesos
Crc cards
Introduction to design patterns
Gestalt Principles in UI Design

What's hot (16)

PPTX
UML Diagram - Use-Case diagram, Activity Diagram, Sequence Diagram, Er Diagra...
PDF
Software Engineering :Behavioral Modelling - I Sequence diagram
PDF
PPTX
Use Case in Software Engineering
PDF
Collaboration diagram- UML diagram
PPT
Software Process in Software Engineering SE3
PPT
Activity diagrams
PDF
Module 1 uml - interaction diagram
PPTX
Diagrams
PPT
Software architecture design ppt
PPT
Unit 1( modelling concepts & class modeling)
PPTX
Design Principles and Elements
PDF
Identifying classes and objects ooad
PPT
Unit 2(advanced class modeling & state diagram)
PPTX
Design Patterns - General Introduction
PPT
Activity Diagram
UML Diagram - Use-Case diagram, Activity Diagram, Sequence Diagram, Er Diagra...
Software Engineering :Behavioral Modelling - I Sequence diagram
Use Case in Software Engineering
Collaboration diagram- UML diagram
Software Process in Software Engineering SE3
Activity diagrams
Module 1 uml - interaction diagram
Diagrams
Software architecture design ppt
Unit 1( modelling concepts & class modeling)
Design Principles and Elements
Identifying classes and objects ooad
Unit 2(advanced class modeling & state diagram)
Design Patterns - General Introduction
Activity Diagram
Ad

Viewers also liked (18)

PPT
Use Case and Activity Diagrams Modeling Notation
PPT
Use case diagram
PPTX
Activity diagram tutorial
DOCX
Uml diagram for_hospital_management_system
PPTX
Hospital Management System
DOCX
Hospital management system project
PPTX
Diagrama de classes
PPTX
Literature Review
PPTX
Designing a Manufacturing Supermarket - November 2016
PDF
Video Rental System
PPTX
Lean Supermarket - Visual Management - November 2016
PPTX
Activity diagram
PPT
Hospital Management System
PPT
Use Case Diagram
PDF
Inventory management system
PDF
The main purpose of the project is to manage the supermarket efficiently (rep...
DOC
project on construction of house report.
PDF
Customer Relationship Management Module Project Report
Use Case and Activity Diagrams Modeling Notation
Use case diagram
Activity diagram tutorial
Uml diagram for_hospital_management_system
Hospital Management System
Hospital management system project
Diagrama de classes
Literature Review
Designing a Manufacturing Supermarket - November 2016
Video Rental System
Lean Supermarket - Visual Management - November 2016
Activity diagram
Hospital Management System
Use Case Diagram
Inventory management system
The main purpose of the project is to manage the supermarket efficiently (rep...
project on construction of house report.
Customer Relationship Management Module Project Report
Ad

Similar to Activity diagrams (20)

PPTX
BPM - Activity diagram.pptx
PPT
Software designe and constractionLec 4B.ppt
PDF
Activity diag
PPT
Activity
PPTX
ACTIVITY DIAGRAM.pptx
DOCX
MOM on activity diagram
PDF
software engineering with uml- activity diagram
PPT
Software System Engineering - Chapter 7
PPTX
Activity_Diagrams_inClass (1).pptx Activity_Diagrams_inClass (1).pptx
PPT
SE- Lecture 5 for software development.ppt
PPT
SE- Lecture 5 SE for easy understanding.ppt
PPTX
Activity diagram model
PPTX
ACTIVITY DIAGRAMS IN OBJECT ORIENTED ANALYSIS AND DESIGN
PDF
week07a.pdf
PDF
Activity diagram-UML diagram
PPTX
Use Case Descriptions Collabration .pptx
PPTX
3150711_SE_GTU_Study_Material_Presentations_Unit-4_11082020081044AM (1).pptx
PPT
Slide 6 Activity Diagram
PPT
Fundamentals of Software Engineering
PPTX
activity diagram It related bs computer semester 5
BPM - Activity diagram.pptx
Software designe and constractionLec 4B.ppt
Activity diag
Activity
ACTIVITY DIAGRAM.pptx
MOM on activity diagram
software engineering with uml- activity diagram
Software System Engineering - Chapter 7
Activity_Diagrams_inClass (1).pptx Activity_Diagrams_inClass (1).pptx
SE- Lecture 5 for software development.ppt
SE- Lecture 5 SE for easy understanding.ppt
Activity diagram model
ACTIVITY DIAGRAMS IN OBJECT ORIENTED ANALYSIS AND DESIGN
week07a.pdf
Activity diagram-UML diagram
Use Case Descriptions Collabration .pptx
3150711_SE_GTU_Study_Material_Presentations_Unit-4_11082020081044AM (1).pptx
Slide 6 Activity Diagram
Fundamentals of Software Engineering
activity diagram It related bs computer semester 5

Activity diagrams

  • 2. Chapter Objectives After studying this chapter you should be able to: Understand the rules and styles guidelines for activity diagrams. Create functional model using activity diagrams.
  • 3. What Is an Activity Diagram? Activity diagrams and use cases are logical model which describe the business domain’s activities without suggesting how they are conduct. A diagram that emphasizes the flow of control from activity to activity in an object.
  • 4. What Is an Activity Diagram? (cont…) Similar to the traditional program flowchart . Used to provide detail for complex algorithms. Portray the primary activities and the relationships among the activities in a process.
  • 5. Drawing Activity Diagrams Purpose to model a task (for example in business modelling) to describe a function of a system represented by a use case to describe the logic of an operation to model the activities that make up the life cycle in the Unified Process
  • 6. Elements of an Activity Diagrams Synchronization bar – horizontal or vertical bars denoting parallel or concurrent paths of activities Decision point – a diamond symbol containing a condition whose results provide transitions to different paths of activities Transition – a movement from one activity or state to another Activity a behavior that an object carries out while in a particular state
  • 7. Notation of Activity Diagrams Activities rectangle with rounded ends meaningful name Transitions arrows with open arrowheads Fill in registration form Register subject
  • 8. Notation of Activity Diagrams Start state black circle Decision points diamond Guard conditions in square brackets Final state black circle in white circle [campaign to add] [no campaign to add] Add a New Client Assign Staff Contact Add New Campaign
  • 9. Notation of Activity Diagrams Alternative notation for branching: alternative transitions are shown leaving the activity with guard conditions Note that guard conditions do not have to be mutually exclusive, but it is advisable that they should be [campaign to add] [no campaign to add] Add a New Client Assign Staff Contact Add New Campaign
  • 10. Notation of Activity Diagrams Object flows dashed arrow Objects rectangle with name of object underlined optionally shows the state of the object in square brackets Record completion of a campaign :Campaign [Active] :Campaign [Completed]
  • 11. Notation of Activity Diagrams Swimlanes vertical columns labelled with the person, organisation or department responsible for the activities in that column Record Completion of a campaign Issue invoice Campaign Manager Client Accountant Pay invoice Record client payment
  • 12. Activity diagram with synchronization bars Top synchronization bar is a fork. Bottom synchronization bar is a join.
  • 13. Guidelines for Creating Activity Diagrams Set the context or scope of the activity being modeled. Identify the activities, control flows, and object flows that occur between the activities. Identify any decisions that are part of the process being modeled. Identify any prospects for parallelism in the process. Draw the activity diagram. Scott Ambler
  • 14. Drawing Activity Diagrams What is the purpose? This will influence the kind of activities that are shown What is being shown in the diagram? What is the name of the business process, use case or operation? What level of detail is required? Is it high level or more detailed?
  • 15. Drawing Activity Diagrams Identify activities Organise the activities in order with transitions Identify any alternative transitions and the conditions on them Add transitions and guard conditions to the diagram
  • 16. Drawing Activity Diagrams Identify any processes that are repeated Add transitions and guard conditions to the diagram
  • 17. Drawing Activity Diagrams Are all the activities carried out by the same person, organisation or department? If not, then add swimlanes to show the responsibilities Name the swimlanes Show each activity in the appropriate swimlane
  • 18. Drawing Activity Diagrams Are there any object flows and objects to show? these can be documents that are created or updated in a business activity diagram these can be object instances that change state in an operation or a use case Add the object flows and objects
  • 19. When Not to Use Activity Diagram An activity diagram should be avoided if: The use case is simple and the graphical representation will not be helpful The purpose is to examine how object collaborate – an interaction diagrams should be used instead. The purpose is to see how an object behaves over its lifetime. – used a statechart diagrams instead
  • 20. Summary In this lecture you have learned about: The purpose of activity diagrams The notation of activity diagrams How to draw activity diagrams
  • 21. Let’s do the exercise
  • 22. Dentist Office System Create an activity diagram for the following dentist office system. Whenever new patients are seen for the first time, they complete a patient information form that asks their name, address, phone number and brief medical history, which are stored in the patient information file. When a patient calls to schedule a new appointment or change an existing appointment, the receptionist checks the appointment file for an available time. Once a good time is found for the patient, the appointment is scheduled. If the patient is a new patient, an incomplete entry is made in the patient file; the full information will be collected when they arrive for their appointment. Because appointments are often made so far in advance, the receptionist usually mails a reminder postcard to each patient two weeks before their appointment.
  • 23. Use case name: Withdraw money The use case is initiated by the customer. Customer inserts the bank-card and enters PIN. ATM SYSTEM authorizes the customer. ATM SYSTEM will eject the card if the authorization is unsuccessful and at the end of every transaction. Then the customer will take the card and leave. If the authorization is successful, ATM SYSTEM asks customer “how much” and the customer enters the amount and ATM SYSTEM checks if amount <= balance. If yes, customer gets the money and ATM SYSTEM updates balance. (Show two activities – customer getting money and ATM SYSTEM updating the balance as parallel events.) If amount > balance, ATM SYSTEM displays an error message and aborts the current transaction.