Activity diagrams. Introduction ● Activity diagrams are a behavioural model that represent the dynamics of the system. ● An activity diagram is essentially.

Slides:



Advertisements
Similar presentations
UML State chart/machine diagram State machine diagram is a behavior diagram which shows discrete behavior of a part of designed system through finite state.
Advertisements

Activity Diagrams in UML. Definition Activity diagrams represent the dynamics of the system. They are flow charts that are used to show the workflow of.
Software Design Process A Process is a set of related and (sequenced) tasks that transforms a set of input to a set of output. Inputs Outputs Design Process.
© 2006 ITT Educational Services Inc. SE350 System Analysis for Software Engineers: Unit 9 Slide 1 Appendix 3 Object-Oriented Analysis and Design.
Information System Design IT60105
7M701 1 Activity Diagram. 7M701 2 Example 7M701 3 Activity Diagram: what is it? Describes activities and flows of data or decisions between activities.
UML Activity Diagrams In UML an activity diagram is used to display the sequence of actions They show the workflow from start to finish Detail the many.
SE 555 Software Requirements & Specification 1 Activity Diagrams.
Ch5: Software Specification. 1 Dynamic modeling using UML  Static models:  Dynamic models:
L06-2-S1 Activity Diagrams 2003 SJSU -- CmpE Software Engineering II Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering.
7M822 UML Activity Diagrams 6 October 2008.
Activity Diagrams. What is Activity Diagrams?  Activity diagrams are a technique to describe procedural logic, business process, and work flow.  An.
1999 – 2006 M.E. Fayad SJSU -- CmpE Software Engineering Management Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering.
UML Activity Diagram. Activity Diagram  The main reason to use activity diagrams is to model the workflow behind the system being designed.  Activity.
Activity Diagrams Derived from several techniques: Event diagrams of Jim Odell SDL state modeling techniques Workflow modeling Petri nets Especially useful.
SE-565 Software System Requirements More UML Diagrams.
Software Design Processes and Management
Karolina Muszyńska Based on: S. Wrycza, B. Marcinkowski, K. Wyrzykowski „Język UML 2.0 w modelowaniu SI”
Software Engineering EKT 420. What is Activity Diagram Activity diagrams are graphical representations of workflows of stepwise activities and actions.
Interaction Modeling. Sequence Models  There are two kinds of sequence models: scenarios and sequence diagrams  A scenario is a sequence of events that.
Activity Diagram.
BPMN By Hosein Bitaraf Software Engineering. Business Process Model and Notation (BPMN) is a graphical representation for specifying business processes.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour.
CS 325: Software Engineering March 3, 2015 Activity Modeling for Transformational Systems Trtansformational Systems UML Activity Diagrams.
Chapter 8: Modelling Interactions and Behaviour UML Activity Diagram
1 Introduction to Flowcharting. 2 Writing a program Defining the problem –Write down what the program will do Planning –Write down the steps, draw a flowchart.
Guide to State Transition Diagram. 2 Contents  What is state transition diagram?  When is state transition diagram used?  What are state transition.
UNIT- Venkata Ratnam K1 BEHAVIORAL MODELING.
Interaction Models (2): Sequence Diagrams Extracted from textbook: Object Oriented Modeling and Design with UML M. Blaha, J. Rumbaugh 1.
1 Devon M. Simmonds University of North Carolina, Wilmington CSC450 Software Engineering WorkFlow Modeling with Activity Diagrams.
February 20, 2012  Present Fayad KSU – SWE Process and Modeling Software Process and Modeling Dr. M.E. Fayad, Professor Software Engineering Department,
11 Software Engineering Dr. K. T. Tsang Lecture 6 Interaction Diagrams
© 2008 Prentice Hall, Ovidiu Noran Lecture 7b 1 Modelling OO Logic Requirements: Sequence Diagrams and Activity Diagrams (Textbook Chapter 8, Appendix)
Information System Design IT60105
Introduction to UML CS A470. What is UML? Unified Modeling Language –OMG Standard, Object Management Group –Based on work from Booch, Rumbaugh, Jacobson.
UNIFIED MODELING LANGUAGE(UML) BY Touseef Tahir Lecturer CS COMSATS Institute of Information Technology, Lahore.
Chapter 11 Activity Diagrams. 2 “Activity diagrams are a technique to describe procedural logic, business processes, and work flows” - M. Fowler An activity.
Object Oriented Analysis & Design & UML (Unified Modeling Language)1 Part VI: Design Continuous Activity Diagams State Diagrams.
CS212: Object Oriented Analysis and Design Lecture 34: UML Activity and Collaboration diagram.
Chapter 3: Introducing the UML
University of Southern California Center for Systems and Software Engineering 9/20/2010© USC-CSSE Activity Diagrams for Business Workflows and.
 Activity diagram is basically a flow chart to represent the flow from one activity to another activity.
Activity Diagramming by Andrzej Rosolski Stanisław Gliniewicz.
Interaction Models (2): Activity Diagrams Extracted from textbook: Object Oriented Modeling and Design with UML M. Blaha, J. Rumbaugh.
Activity Diagrams. Notation Activity1()cActivity2() 1. Activities 2. Transition.
Business Process and Functional Modeling
UML Chapter 17.
Analysis Classes Unit 5.
Activity Diagrams.
Information Delivery Manuals: Process Mapping
Unified Modeling Language
Activity Diagram.
Activity and State Transition Diagram
Visit for more Learning Resources
State Machine Diagrams
Chapter 8: Modelling Interactions and Behaviour UML Activity Diagram
Activity Diagrams Activity diagrams describe the workflow behavior of a system.  The diagrams describe the state of activities by showing the sequence.
Activity Diagrams.
UML Activity Diagrams.
Software Engineering Chapter 5 (Part 3) System Modeling Dr.Doaa Sami.
Process Modeling: Activity/Swimlane Diagrams
Software System Engineering
Week 12: Activity & Sequence Diagrams
Activity Diagrams.
Activity diagram It supports visual representation of sequences of actions that target a certain result. May be built for one or many use cases or for.
Activity Diagrams for Business Workflows and Scenarios
Behavioral Diagrams P. P. Mahale
Object-Oriented Analysis & Design
Interaction Models (2): Activity Diagrams
Presentation transcript:

Activity diagrams

Introduction ● Activity diagrams are a behavioural model that represent the dynamics of the system. ● An activity diagram is essentially a fancy flowchart. they show the flow of control from activity to activity in the system, – What activities can be done in parallel and – any alternate paths in the flow. ● Activity diagrams can be used to show the flow across use cases or they may be used to represent the flow within a particular use case

Introduction ● Activity diagrams and state chart diagrams are related. – Activity diagrams are a special type of state. – because activities are the state of doing something. – While a state chart diagram focuses attention on an object undergoing a process (or on a process as an object), – an activity diagram focuses on the flow of activities involved in a single process. – Activity diagram shows the how those activities depend on one another.. ● The diagrams describe the state of activities by showing the sequence of activities performed.

Contents of an activity diagram ● Activities represented as rectangles with rounded edges. ● Transitions between the activities, drawn as directed arrows, ● Decision points shown as diamonds, and ● Synchronisation bars represented with thick or vertical bars.

Activity ● An activity represents the perfomance of some behavior in the workflow Create curriculum Create catalogue Select course to teach

Flow Transitions ● Transitions are used to show the passing of the control from one activity to another. – Shows how the action states are related to another. ● They are triggered by the completion of the behavior in the originating activity. Create curriculum Create catalogue Select course to teach

Types of transitions ● There are two kinds – Control flow – Object flow

Control flow ● Indicates the order of action states – That is, once a source action state completes its processing, a target action state starts its processing. – For example, the project management system may have the following order of action states for the task of generating a report: 1. The Project Manager Enters Report Criteria action state occurs first, because the project manager must enter the report criteria before the system can generate a report. 2. The Project Management System Generates Report action state occurs next, because the project management system must generate the report before the printer can print the report. 3. The Printer Prints Report action state occurs last, once the report has been generated by the project management system.

Control flow Control-flow transitions are also known as default transitions or automatic transitions, because they are unlabeled and are immediately triggered after the source action state completes processing.

Object flow ● An object-flow transition indicates that an action state inputs or outputs an object. ● For example, the action states shown in the Figure (next slide) may have inputs and outputs as follows: ● Project Manager Enters Report Criteria – Outputs a Report Criteria object and may be renamed as the Project Manager – Enters Data action state ● Project Management System Generates Report – Inputs the Report Criteria object and outputs a Report object and may be renamed as the Project Management System Generates Information action state ● Printer Prints Report – Inputs the Report object and may be renamed as the Printer Prints Information action state

Object flows ● The advantage of using object flows is that action state names can now focus purely on the actions, while the object-flow transitions indicate clearly the inputs and outputs to and from the actions.

Transition flows ● A control-flow transition may be omitted when an object-flow transition indicates the ordering of action states; that is, – when an action state produces an output that is input to a subsequent action state, the object-flow transition implies a control-flow transition and an explicit control-flow transition is not necessary.

Decision points ● When modelling the workflow of a system it is often necessary to show where the flow of control branches based on decision points. ● The transitions from a decision point contain a guard condition, which is used to determine which path from the decision point is taken. ● Decisions along with their guard conditions allow you to show alternate paths through a workflow.

Decision points Create curriculum Assign professor to course Select course to teach Are all professors Assigned?

A transition with a guard Create curriculum Assign professor to course Select course to teach Are all professors Assigned? No

Decisions ● Notice that because the diamond shape is in the project manager’s swimlane, the project manager is responsible for making the decision.

Concurrency ● In a workflow some activities may be perfomed at the same time. ● A syncronisation bar allows you to specify which activities may be performed concurrently. – In the UML, concurrency is shown using a short heavy bar. – If a bar has one incoming transition and two or more outgoing transitions, it indicates that all outgoing transitions occur once the incoming transition occurs. This is called splitting of control. – If a bar has two or more incoming transitions and one outgoing transition, it indicates that all incoming transitions must occur before the outgoing transition occurs. This is called synchronization of control.

Syncronisation Bars Create curriculum Assign professor to course Select course to teach Are all professors Assigned? No Yes

Create catalogue Place catalogue in book store Mail catalogue To students Open registration Yes

Concurrency

Swimlanes ● Swimlanes may be used to partition an activity diagram. ● This is mainly done to show what person or organisation is repsonsible for the activities contained in the swimlane ● For example, the project management system may have the following swimlanes, which are illustrated in Figure below: ● Project Manager – Shows the action states that are the responsibility of a project manager. The swimlane makes it obvious that the project manager is responsible for entering data, thus the rather cumbersome action state name of Project Manager Enters – Data may be shortened to Enter Data.

Swimlanes ● Project Management System – Shows the action states that are the responsibility of the project management system. Again, because the swimlane makes it obvious who (or what, in this case) is generating information, the rather cumbersome action state name of Project Management System Generates Information may be shortened to Generate Information. ● Printer – Shows the action states that are the responsibility of a printer. Because of this swimlane, the rather cumbersome action state name of Printer Prints – Information may be shortened to Print Information.

Swimlanes Create curriculum Assign professor to course Select course to teach Are all professors Assigned? No Yes RegistraProfessor

Create catalogue Place catalogue in book store Mail catalogue To students Open registration Yes

Swimlanes example

Initial and final activities ● There are special symbols that are used to show the starting and final activities in a work flow ● The starting activity is shown using a solid filled circle and the final activities are shown using a bull’s eye. ● Typically there’s one starting activity for the work flow and there may be more than one ending activity (One for each alternate flow in the workflow).

Initial and final activities Create curriculum Assign professor to course Select course to teach Are all professors Assigned? No Yes

Create catalogue Place catalogue in book store Mail catalogue To students Open registration Yes

Diagrams used ● Initial node. The filled in circle is the starting point of the diagram. An initial node isn’t required although it does make it significantly easier to read the diagram. ● Activity final node. A filled circle (Bull eye) with a border is the ending point. An activity diagram can have zero or more activity final nodes. ● Activity. The rounded rectangles represent activities that occur. An activity may be physical, such as Inspect Forms, or electronic, such as Display Create Student Screen. ● Flow/edge. The arrows on the diagram.

Diagrams used ● Fork. A black bar with one flow going into it and several leaving it. This denotes the beginning of parallel activity. ● Join. A black bar with several flows entering it and one leaving it. This denotes the end of parallel processing. ● Condition. Text such as [No] on a flow, defining a guard which must evaluate to true in order to traverse the node. ● Decision. A diamond with one flow entering and several leaving. The flows leaving include conditions although some modelers will not indicate the conditions if it is obvious.

Diagrams used ● Merge. A diamond with several flows entering and one leaving. The implication is that all incoming flows must reach this point until processing continues, unless otherwise. ● Partition. Also called swimlanes, indicates who/what is performing the activities. ● Sub-activity indicator. The rake in the bottom corner of an activity, indicates that the activity is described by a more finely detailed activity diagram. ● Flow final. The circle with the X through it. This indicates that the process stops at this point. ● Signal: When an activity sends or receives a message, that activity is called a signal. – Signals are of two types: Input signal (Message receiving activity) shown by a concave polygon and Output signal (Message sending activity) shown by a convex polygon.

How to Draw: Activity Diagrams ● Activity diagrams show the flow of activities through the system. ● Diagrams are read from top to bottom and have branches and forks to describe conditions and parallel activities. – A fork is used when multiple activities are occurring at the same time. – The diagram below shows a fork after activity1. – This indicates that both activity2 and activity3 are occurring at the same time. – After activity2 there is a branch. – The branch describes what activities will take place based on a set of conditions. – All branches at some point are followed by a merge to indicate the end of the conditional behavior started by that branch. – After the merge all of the parallel activities must be combined by a join before transitioning into the final activity state.

Example ● Below is a possible activity diagram for processing an order. ● The diagram shows the flow of actions in the system's workflow. ● Once the order is received the activities split into two parallel sets of activities. – One side fills and sends the order while the other handles the billing. – On the Fill Order side, the method of delivery is decided conditionally. – Depending on the condition either the Overnight Delivery activity or the Regular Delivery activity is performed. – Finally the parallel activities combine to close the order.

When to Use: Activity Diagrams ● Activity diagrams should be used in conjunction with other modeling techniques such as interaction diagrams and state diagrams. ● The main reason to use activity diagrams is to model the workflow behind the system being designed. ● Activity Diagrams are also useful for: – analyzing a use case by describing what actions need to take place and when they should occur; – describing a complicated sequential algorithm; – and modeling applications with parallel processes. ● However, activity diagrams should not take the place of interaction diagrams and state diagrams. – Activity diagrams do not give detail about how objects behave or how objects collaborate.