Presentation is loading. Please wait.

Presentation is loading. Please wait.

COMP1007 Intro to Requirements Analysis © Copyright De Montfort University 2002 All Rights Reserved COMP1007 Introduction to Requirements Analysis Lecture.

Similar presentations


Presentation on theme: "COMP1007 Intro to Requirements Analysis © Copyright De Montfort University 2002 All Rights Reserved COMP1007 Introduction to Requirements Analysis Lecture."— Presentation transcript:

1 COMP1007 Intro to Requirements Analysis © Copyright De Montfort University 2002 All Rights Reserved COMP1007 Introduction to Requirements Analysis Lecture 7 Activity Diagrams

2 COMP1007 Intro to Requirements Analysis © Copyright De Montfort University 2002 All Rights Reserved Learning Objectives v Identify the need for activity modelling v UML notation for activity diagrams v Examine the use of activity diagrams in the Rational Unified Process.

3 COMP1007 Intro to Requirements Analysis © Copyright De Montfort University 2002 All Rights Reserved Activity Modelling v Computer systems and the commercial / work environments in which they are used comprise may activities –business activities performed by people u eg respond to customer query, despatch customer order, send customer product catalogue –activities performed with the information system by software u eg calculate VAT due on an order, generate order for low product stock items –activities performed by machines under computer control

4 COMP1007 Intro to Requirements Analysis © Copyright De Montfort University 2002 All Rights Reserved Activity Modelling v Business processes are typically captured in use cases v Computer procedures are embodied in operations (analysis) and the methods (design and construction) that implement them. (Note that objects collaborate to realize a use case).

5 COMP1007 Intro to Requirements Analysis © Copyright De Montfort University 2002 All Rights Reserved Dynamic Modelling v Activity diagrams are one of the five modelling techniques in UML that capture the dynamics of the system v The others are –Use case diagram –Sequence diagram –Collaboration diagram –Statechart diagram

6 COMP1007 Intro to Requirements Analysis © Copyright De Montfort University 2002 All Rights Reserved Activity Diagrams v An activity diagram represents the a series of actions in sequence. v Activity diagrams are essentially flowcharts, rather similar in format to system flowcharts though used in a somewhat different way.

7 COMP1007 Intro to Requirements Analysis © Copyright De Montfort University 2002 All Rights Reserved Activity Diagram - notation Activity diagram for calculateBonus() operation Bennett, McRobb, Farmer 1999 Intial action state Final action state Action State Transition Guard condition Decision

8 COMP1007 Intro to Requirements Analysis © Copyright De Montfort University 2002 All Rights Reserved Notation v An action state is normally used to model a step in the execution of an algorithm or procedure v When an action state ends the next action state (depending upon guard conditions) executes.

9 COMP1007 Intro to Requirements Analysis © Copyright De Montfort University 2002 All Rights Reserved Notation v Transitions show the sequence of the actions. These transitions are completion transitions. v Guard conditions are used represent conditional paths of execution.

10 COMP1007 Intro to Requirements Analysis © Copyright De Montfort University 2002 All Rights Reserved Notation v A thread of execution with a guard condition is only executed if the condition is satisfied. v Decisions and guard conditions are used to show alternate threads.

11 COMP1007 Intro to Requirements Analysis © Copyright De Montfort University 2002 All Rights Reserved Activity Diagram - nested decisions Bennett, McRobb, Farmer 1999 Nested decisions can be used to represent complex conditions

12 COMP1007 Intro to Requirements Analysis © Copyright De Montfort University 2002 All Rights Reserved Concurrent threads v Concurrent threads can be shown by using synchronization bars. v A synchronization bar shows the start (fork) or end (join) of a group of parallel subflows.

13 COMP1007 Intro to Requirements Analysis © Copyright De Montfort University 2002 All Rights Reserved Find cup Fill kettle with water Find tea bag [milk required] Add water to cup Boil water in kettle Place tea bag in cup Add milk [no milk required] Bennett, McRobb, Farmer 1999 Synchronization bar (fork) Synchronization bar (join)

14 COMP1007 Intro to Requirements Analysis © Copyright De Montfort University 2002 All Rights Reserved Example: Enrolment v Prepare an activity diagram for student enrolment v Typical activities might be –Prepare registration documentation –Arrange enrolment session –Enrol student at the beginning of the academic year –Complete enrolment form –Send joining instructions to student *

15 COMP1007 Intro to Requirements Analysis © Copyright De Montfort University 2002 All Rights Reserved *

16 COMP1007 Intro to Requirements Analysis © Copyright De Montfort University 2002 All Rights Reserved Object flows v Object flows are used to show how objects involved in a workflow, procedure or algorithm. v An object may be the output of an activity and the input activities. v Object flow is a kind of control flow which it replaces. v The object flow symbol shows an object in a particular state.

17 COMP1007 Intro to Requirements Analysis © Copyright De Montfort University 2002 All Rights Reserved Bennett, McRobb, Farmer 1999 Swimlanes Object flow Note that the object changes state

18 COMP1007 Intro to Requirements Analysis © Copyright De Montfort University 2002 All Rights Reserved Swimlanes v An activity diagram may be partitioned into swimlanes. v Each swimlanes represents a particular responsibility for some of the action states. v The responsibilities may be allocated to a person, a part of an organisation, or a set of classes.

19 COMP1007 Intro to Requirements Analysis © Copyright De Montfort University 2002 All Rights Reserved Example: Enrolment v Redraw the activity diagram with swimlanes. –possible participants with responsibilities could be Registry, Faculty and Student. *

20 COMP1007 Intro to Requirements Analysis © Copyright De Montfort University 2002 All Rights Reserved RegistryFacultyStudent *

21 COMP1007 Intro to Requirements Analysis © Copyright De Montfort University 2002 All Rights Reserved Where are activity diagrams used? v Activity diagrams can be used for a number of different purposes:  to model a human task (in business modelling for instance);  to describe a system function that is represented by a use case;  in operation specifications, to describe the logic of an operation. Bennett, McRobb, Farmer 1999

22 COMP1007 Intro to Requirements Analysis © Copyright De Montfort University 2002 All Rights Reserved Activity diagram & BOM v Describes the ordering of activities or tasks that accomplish business goals. v Activity diagrams help –with understanding information systems introduction –establishing objectives of IS orjects –justify plans for automation

23 COMP1007 Intro to Requirements Analysis © Copyright De Montfort University 2002 All Rights Reserved Business Use Case Model v A business use case typically involves a workflow that produces some benefit for the business actor. v Activity diagrams are used to describe the structure of workflows

24 COMP1007 Intro to Requirements Analysis © Copyright De Montfort University 2002 All Rights Reserved Activity diagrams & Use Cases v The flow of events of a use case describes the sequence of activities that together produce the value for an actor. v An activity diagram can be used to describe the flow of events of a use case.

25 COMP1007 Intro to Requirements Analysis © Copyright De Montfort University 2002 All Rights Reserved Summary v Identify the need for activity modelling v UML notation for activity diagrams v Examine the use of activity diagrams in the Rational Unified Process

26 COMP1007 Intro to Requirements Analysis © Copyright De Montfort University 2002 All Rights Reserved References v Maciaszek, Requuirements Analysis & Systems Design Chapters 2 v Bennett, S. et. al. (1999)“Object-Oriented Systems Analysis & Design using UML” McGraw-Hill, Maidenhead. v OMG (1999) “Unified Modeling Language Specification,version 1.3” v Rational Unified Process 2000


Download ppt "COMP1007 Intro to Requirements Analysis © Copyright De Montfort University 2002 All Rights Reserved COMP1007 Introduction to Requirements Analysis Lecture."

Similar presentations


Ads by Google