Activity Diagrams Roman Kontchakov Birkbeck, University of London - - PowerPoint PPT Presentation

activity diagrams
SMART_READER_LITE
LIVE PREVIEW

Activity Diagrams Roman Kontchakov Birkbeck, University of London - - PowerPoint PPT Presentation

Information Systems Concepts Activity Diagrams Roman Kontchakov Birkbeck, University of London Based on Chapter 5 of Bennett, McRobb and Farmer: Object Oriented Systems Analysis and Design Using UML, (4th Edition), McGraw Hill, 2010 1 Outline


slide-1
SLIDE 1

1

Information Systems Concepts Activity Diagrams Roman Kontchakov

Birkbeck, University of London

Based on Chapter 5 of Bennett, McRobb and Farmer: Object Oriented Systems Analysis and Design Using UML, (4th Edition), McGraw Hill, 2010

slide-2
SLIDE 2

2  Activity Diagrams

 Section 5.3 (pp. 122 – 128)

Outline

slide-3
SLIDE 3

3

Purpose of Activity Diagrams

 Activity Diagrams can be used to model

 high-level business tasks

 in the early stages of a project or  when the relevant objects or classes have not been identified

 system functions (represented by use cases) or object

  • perations

 but communication/sequence diagrams are closer to the spirit

  • f object-orientation
slide-4
SLIDE 4

4

Notation of Activity Diagrams

 Activity Diagrams are essentially Flowcharts /

Petri nets in an object-oriented context

 sequence, selection, iteration  concurrence

slide-5
SLIDE 5

5

Notation of Activity Diagrams (1)

 action node

 rectangle with rounded

corners and a meaningful name

 action edge

(control flow)

 open arrow

Add a New Client Assign Staff Contact

slide-6
SLIDE 6

6

Notation of Activity Diagrams (2)

 initial node

 black circle

 decision node

merge node

 diamond

 guard condition

 in square brackets

 final node

 black circle in white circle

[campaign to add] [no campaign to add] Add a New Client Assign Staff Contact Add New Campaign

slide-7
SLIDE 7

7

Tips on Activity Diagrams

 Multiple flows from an action are implicitly AND-ed  Guard conditions do not have to be mutually

exclusive, but it is advisable that they should be

 Decisions should be strictly nested, but a merge point

can be combined with the following decision point

slide-8
SLIDE 8

8

Notation of Activity Diagrams (3)

 fork node

join node

 thick bar

 actions carried

  • ut in parallel

Add a New Client Assign Staff Contact Add New Campaign

slide-9
SLIDE 9

9

Notation of Activity Diagrams (4)

 class name

 can be shown followed

by double colons in brackets (parentheses) beneath the action name

 Operation Name

 can be shown after the

colons, when different with the action name

[no more adverts] getFirst (AdvertCollection::) getCost (Advert:) getNext (AdvertCollection::) getOverheads (Campaign::) [more adverts] Campaign::calculateCost [no more adverts] getFirst (AdvertCollection::) getCost (Advert:) getNext (AdvertCollection::) getOverheads (Campaign::) [more adverts] Campaign::calculateCost

slide-10
SLIDE 10

10

Notation of Activity Diagrams (5)

 objects

 rectangle  optionally shows the

state of the object in square brackets

 object flows

 open arrow

Record completion

  • f a campaign

Campaign [Active] Campaign [Completed]

slide-11
SLIDE 11

11

Notation of Activity Diagrams (6)

 activity partitions

(swimlanes)

 vertical columns  labelled with the

person, organization, department or system responsible for the activities in that column

Record Completion

  • f a campaign

Issue invoice

Campaign Manager Client Accountant

Pay invoice Record client payment

slide-12
SLIDE 12

[no more staff to assign] [more staff to assign] [no staff to assign] Assign Staff Contact Add New Campaign [campaign to add] [no campaign to add] Assign Staff to Campaign [staff to assign] Add a New Client Administrator Campaign Manager :Client [New] :Campaign [Commissioned]

slide-13
SLIDE 13

Activity Diagram for producing a book.

Write Chapter Review Chapter

Author Printer Typesetter Reviewer

Typeset Book Correct Proofs Reset Book Print Book [book complete] [book not complete] Revise Chapter Write Chapter Review Chapter

Author Printer Typesetter Reviewer

Typeset Book Correct Proofs Reset Book Print Book [book complete] [book not complete] Revise Chapter

slide-14
SLIDE 14

Write Chapter Review Chapter

Author Printer Typesetter Reviewer

Typeset Book Correct Proofs Reset Book Print Book [book complete] [book not complete] Revise Chapter Write Chapter Review Chapter

Author Printer Typesetter Reviewer

Typeset Book Correct Proofs Reset Book Print Book [book complete] [book not complete] Revise Chapter Plan Chapter Produce First Draft Revise Draft [satisfied] [not satisfied] Add Exercises Add References to Bibliography Write Chapter

More details can be shown on a lower level.

slide-15
SLIDE 15

15

Exercise: Supermarket Self-service Checkout

slide-16
SLIDE 16

16

Take Home Messages

 Activity Diagrams

 Purpose  Notation