0% found this document useful (0 votes)
35 views38 pages

Lecture-Activity Diagrams

The document discusses system sequence diagrams and activity diagrams. It provides an overview of system sequence diagrams, including that they illustrate events between actors and systems, are drawn during analysis based on use cases, and treat the system as a black box. It also discusses key aspects of drawing activity diagrams, such as modeling tasks and system operations, and sequencing activities using elements like forks and joins.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views38 pages

Lecture-Activity Diagrams

The document discusses system sequence diagrams and activity diagrams. It provides an overview of system sequence diagrams, including that they illustrate events between actors and systems, are drawn during analysis based on use cases, and treat the system as a black box. It also discusses key aspects of drawing activity diagrams, such as modeling tasks and system operations, and sequencing activities using elements like forks and joins.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 38

CS / SS G514 Object Oriented

Analysis and Design

10/19/22 1
Today’s Agenda

System Sequence Diagrams


Activity Diagrams

10/19/22 OOAD 2
Agate Case Study
Agate is an advertising agency in Birmingham. Agate
deals with other companies that it calls clients. A record is
kept of each client company. Clients have advertising
campaign, and a record is kept of every campaign. Each
campaign includes one or more adverts. Agate nominates
members of creative team, which work on campaign.
  One member of the creative team manages each
campaign. Staff may be working on more than one project
at a time. When a campaign starts, the manager responsible
estimates the likely cost of the client and agrees it with the
client. A finish date may be set for a campaign at any time,
and may be changed. When the campaign is completed, an
actual completion date and the actual cost are recorded.
When the client pays, the date paid is recorded. The
manager checks the campaign budget periodically.
 10/19/22 The system should also hold the staff grades and 3
calculate staff salaries.
Sample Requirements List
No. Requirement Use Case(s)
1. To record names, address and contact Add a new client
details for each client.
2. To record the details of each campaign for Add a new campaign
each client. This will include the title of the
campaign, planned start and finish dates,
estimated costs, budgets, actual costs and
dates, and the current state of completion.
3. To provide information that can be used in Record completion of
the separate accounts systems for invoicing a campaign
clients for campaigns.
4. To record payments for campaign that are Record client
also recorded in the separate accounts payment
system.
5. To record which staff are working on which Assign staff to work
campaigns, including the campaign manager on a campaign
for each campaign.

10/19/22 4
10/19/22 5
SSD and Use Cases
:System
:Cashier
makeNewSale()
mple cash-only Process Sale Scenario
addLineItem(itemID, quantity)
Customer arrives at a POS checkout
with goods to purchase.
Cashier starts a new sale. description, total
Cashier enters item identifier. *[more items]
System records sale line item, and
presents item description, price and endSale()
unning total.
cashier repeats steps 3-4 until total with taxes
ndicates done.
System presents total with taxes makePayment(amount)
calculated.
change due, receipt
10/19/22 6
System sequence diagrams [1]
 A system sequence diagram illustrates events from actors to
systems and the external response of the system

 SSD drawing occurs during the analysis phase of a


development cycle; dependent on the creation of the use cases
and identification of concepts.

 UML notation - Sequence Diagram not System Sequence


Diagram.

10/19/22 7
System sequence diagrams [2]

 One diagram depicts one scenario. This is the main success


scenario.

 Frequent or complex alternate scenarios could also be


illustrated.
 A system is treated as a black box.

 SSD is often accompanied by a textual description of the


scenario to the left of the diagram.

10/19/22 8
System sequence diagram [3]
 Identify the system boundary…what is inside and what is outside.

 System event: An external event that directly stimulates the


(software) system.
 Events are initiated by actors.

 Name an event at the level of intent and not using their physical
input medium or interface widgets.
 enterItem() is better than scan().

 Keep the system response at an abstract level.


 description, total is preferred over display description and

total on the POS screen.


10/19/22 9
The System Boundary

[Larman, 2002]

10/19/22 10
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
Model dynamic behavior of a system as a flowchart.
Description of a business process, by activities and
their I/O.
10/19/22 11
Drawing Activity Diagrams
 Purpose
 Draw the activity flow of a system. Activity can be
described as an operation of the system.
 Describe the sequence from one activity to
another.
 Describe the parallel, branched and concurrent
flow of the system.
 Captures dynamic behavior of the system as like
other behavioral diagrams but activity diagram
show message flow from one activity to another.
10/19/22 12
UML Activity Diagram

 An activity diagram is a variation or special case of a state


machine, in which the states are activities representing the
performance of operations and the transitions are triggered
by the completion of the operations.
 An activity diagram shows actions and control flow is drawn
from one operation to another. This flow can be sequential,
branched or concurrent.
 Understand the rules and style guidelines for activity diagram
 Be able to create functional models using activity diagrams.
 Activity diagrams deals with all type of flow control by using
different elements like fork, join etc.
10/19/22 13
BPM With Activity Diagrams
 A number of activities support a
business process across several
departments
 Activity diagrams model the behavior in
a business process
 Sophisticated data flow diagrams
 Addresses Parallel concurrent activities and
complex processes

Slide 14
10/19/22
How to draw Activity
Diagram
 Before drawing an activity diagram we must have a
clear understanding about the elements used in activity
diagram.

 The main element of an activity diagram is the activity


itself. An activity is a function performed by the system.

 After identifying the activities we need to understand


how they are associated with constraints and
conditions.

10/19/22 15
Notation of Activity Diagrams
 Activities
 rectangle with rounded ends Add a New
Client
 meaningful name
Assign Staff
Contact
 Transitions
 arrows with open
arrowheads

10/19/22 16
Notation of Activity Diagrams
 Start state Add a New
Client
 black circle
 Decision points Assign Staff
 diamond Contact

 Guard conditions [no campaign to add]


 in square brackets
[campaign to add]
 Final state
 black circle in white circle Add New
Campaign

10/19/22 17
Notation of Activity Diagrams
 Alternative notation for Add a New
Client

branching: Assign Staff [no campaign to add]


 alternative transitions Contact

are shown leaving the [campaign to add]

activity with guard Add New


Campaign
conditions
 Note that guard conditions do not have
to be mutually exclusive, but it is
advisable that they should be

10/19/22 18
UML Activity Decision

[hours < =40]


Calculate payroll Normal payroll

[hours > 40]


Overtime, get authoriation

10/19/22 19
Branching Nodes
Dry Clothes

merge
node Run Drier

[still wet]
decision [else] guards
node Fold
Clothes

10/19/22 20
Notation of Activity Diagrams
 Object flows :Campaign
[Active]
 dashed arrow
Record completion
 Objects of a campaign

 rectangle :Campaign
[Completed]
 with name of object
underlined
 optionally shows the
state of the object in
square brackets

10/19/22 21
Notation of Activity Diagrams
Campaign Accountant Client
Manager

 Swimlanes
Record Completion
 vertical columns of a campaign

 labelled with the Issue invoice

person, organisation
or department Pay invoice

responsible for the


activities in that Record client
payment

column

10/19/22 22
Notation of Activity Diagrams
Campaign Accountant Client
Manager

 Swimlanes
Record Completion
 vertical columns of a campaign

 labelled with the Issue invoice

person, organisation
or department Pay invoice

responsible for the


activities in that Record client
payment

column

10/19/22 23
Subset of structural elements
of ADs

10/19/22 24
10/19/22 25
10/19/22 26
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?

10/19/22 27
Drawing Activity Diagrams
 Identify activities
 What happens when a new client is added
in the Agate system?
 Add a New Client
 Assign Staff Contact
 Add New Campaign
 Assign Staff to Campaign
 Organise the activities in order with
transitions

10/19/22 28
Drawing Activity
Diagrams Add a New
Client

Assign Staff
Contact

Add New
Campaign

Assign Staff
to Campaign

10/19/22 29
Drawing Activity Diagrams
 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
 Add transitions and guard conditions to
the diagram
10/19/22 30
Drawing Activity
Diagrams Add a New
Client

Assign Staff [no campaign to add]


Contact

[campaign to add]

Add New [no staff to assign]


Campaign

[staff to assign]

Assign Staff
to Campaign

10/19/22 31
Drawing Activity Diagrams
 Identify any processes that are
repeated
 they will want to assign staff to the
campaign until there are no more staff to
add
 Add transitions and guard conditions to
the diagram

10/19/22 32
Drawing Activity
Diagrams Add a New
Client

Assign Staff [no campaign to add]


Contact

[campaign to add]

Add New [no staff to assign]


Campaign

[staff to assign]

[no more staff to assign]


Assign Staff
to Campaign
[more staff to assign]

10/19/22 33
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

10/19/22 34
Administrator Campaign Manager

Add a New
Client

Assign Staff [no campaign to add]


Contact

[campaign to add]

Add New [no staff to assign]


Campaign

[staff to assign]

Assign Staff
to Campaign

10/19/22 35
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
 Data and objects are shown as object
10/19/22
nodes 36
Administrator Campaign Manager

Add a New :Client


Client [New]

Assign Staff [no campaign to add]


Contact

[campaign to add]

:Campaign Add New [no staff to assign]


[Commissioned] Campaign

[staff to assign]

Assign Staff
to Campaign

10/19/22 37
Swimlanes.
office clerk InsuranceAgent Loanofficer

Prepare incoming
documents

Make electronic
file Index documents

Complete
request

Check data for life Draw up concept


insurance mortgage-deed

Calculate data for


Pay provision to
construction
mortgage insurance agent

Draw up insurance
policy
10/19/22 38

You might also like