Download presentation
Presentation is loading. Please wait.
1
03/12/2001 © Bennett, McRobb and Farmer 2002 1 Activity Diagrams Based on Chapter 5 of Bennett, McRobb and Farmer: Object Oriented Systems Analysis and Design Using UML, (2 nd Edition), McGraw Hill, 2002.
2
© Bennett, McRobb and Farmer 2002 2 In This Lecture You Will Learn: n The purpose of activity diagrams n The notation of activity diagrams n How to draw activity diagrams
3
© Bennett, McRobb and Farmer 2002 3 Drawing Activity Diagrams n 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
4
© Bennett, McRobb and Farmer 2002 4 Notation of Activity Diagrams n Activities –rectangle with rounded ends –meaningful name n Transitions –arrows with open arrowheads Add a New Client Assign Staff Contact
5
© Bennett, McRobb and Farmer 2002 5 Notation of Activity Diagrams n Start state –black circle n Decision points –diamond n Guard conditions –in square brackets n Final state –black circle in white circle [campaign to add] [no campaign to add] Add a New Client Assign Staff Contact Add New Campaign
6
© Bennett, McRobb and Farmer 2002 6 Notation of Activity Diagrams n Alternative notation for branching: –alternative transitions are shown leaving the activity with guard conditions n 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
7
© Bennett, McRobb and Farmer 2002 7 Notation of Activity Diagrams n Object flows –dashed arrow n 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]
8
© Bennett, McRobb and Farmer 2002 8 Notation of Activity Diagrams n 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 ClientAccountant Pay invoice Record client payment
9
© Bennett, McRobb and Farmer 2002 9 Drawing Activity Diagrams n What is the purpose? –This will influence the kind of activities that are shown n What is being shown in the diagram? –What is the name of the business process, use case or operation? n What level of detail is required? –Is it high level or more detailed?
10
© Bennett, McRobb and Farmer 2002 10 Drawing Activity Diagrams n Identify activities –What happens when a new client is added in the Agate system? n Add a New Client n Assign Staff Contact n Add New Campaign n Assign Staff to Campaign n Organise the activities in order with transitions
11
© Bennett, McRobb and Farmer 2002 11 Drawing Activity Diagrams Add a New Client Assign Staff Contact Add New Campaign Assign Staff to Campaign
12
© Bennett, McRobb and Farmer 2002 12 Drawing Activity Diagrams n Identify any alternative transitions and the conditions on them –sometimes there is a new campaign to add for a new client, sometimes not –sometimes they will want to assign staff to the campaign, sometimes not n Add transitions and guard conditions to the diagram
13
© Bennett, McRobb and Farmer 2002 13 Drawing Activity Diagrams [no staff to assign] Add a New Client Assign Staff Contact Add New Campaign [campaign to add] [no campaign to add] Assign Staff to Campaign [staff to assign]
14
© Bennett, McRobb and Farmer 2002 14 Drawing Activity Diagrams n Identify any processes that are repeated –they will want to assign staff to the campaign until there are no more staff to add n Add transitions and guard conditions to the diagram
15
© Bennett, McRobb and Farmer 2002 15 Drawing Activity Diagrams [no staff to assign] [no more staff to assign] Add a New Client Assign Staff Contact Add New Campaign [campaign to add] [no campaign to add] Assign Staff to Campaign [staff to assign] [more staff to assign]
16
© Bennett, McRobb and Farmer 2002 16 Drawing Activity Diagrams n Are all the activities carried out by the same person, organisation or department? n If not, then add swimlanes to show the responsibilities n Name the swimlanes n Show each activity in the appropriate swimlane
17
© Bennett, McRobb and Farmer 2002 17 [no staff to assign] Add a New Client Assign Staff Contact Add New Campaign [campaign to add] [no campaign to add] Assign Staff to Campaign [staff to assign] Campaign ManagerAdministrator
18
© Bennett, McRobb and Farmer 2002 18 Drawing Activity Diagrams n 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 n Add the object flows and objects
19
© Bennett, McRobb and Farmer 2002 19 [no staff to assign] Add a New Client Assign Staff Contact Add New Campaign [campaign to add] [no campaign to add] Assign Staff to Campaign [staff to assign] Campaign ManagerAdministrator :Campaign [Commissioned] :Client [New]
20
© Bennett, McRobb and Farmer 2002 20 Summary In this lecture you have learned about: n The purpose of activity diagrams n The notation of activity diagrams n How to draw activity diagrams
21
© Bennett, McRobb and Farmer 2002 21 References n Booch, Rumbaugh and Jacobson (1999) n Rumbaugh, Jacobson and Booch (1999) (For full bibliographic details, see Bennett, McRobb and Farmer)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.