Tải bản đầy đủ (.pdf) (32 trang)

Software design: Lecture 22 - Sheraz Pervaiz

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (550.41 KB, 32 trang )

1

Software Design

Lecture : 22


2

Categories of UML Diagrams (3)
Ø

Ø

Static
ü

Use case diagram

ü

Class diagram

Dynamic

ü

Activity diagram


3



Ø

Implementation

ü

Component diagram

ü

Deployment diagram


4

Introduction to Activity Diagram
Ø

In many ways UML Activity diagrams are the object­
oriented equivalent of flow charts and data­flow 
diagrams (DFDs).  They are used to explore the logic of:

Ø

A complex operation

Ø

A complex business rule


Ø

A single use case

Ø

Several use cases

Ø

A business process 


5

Activity Diagram – Dynamic 
Category
Ø

It shows the flow from activity to activity within 
a single process  i­e Work Flow.

Ø

With an activity diagram, you can also model the 
flow of an object as it moves from state to state

    at different points in the flow of control



6

Basic Vocabulary of Activity 
Diagram
Ø

Diagrams are read from top to bottom and have 
branches and forks to describe conditions and 
parallel activities


7

Initial State
Ø 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

Ø There 

will  be  only  one  initial  state  in  the  activity 

diagram


8


Activity 
Ø

An activity, also known as an activity state, on a 
UML  Activity  diagram  typically  represents  the 
invocation  of  an  operation,  a  step  in  a  business 
process, or an entire business process.

Ø

The  rounded  rectangles  represent  activities  that 
occur


9

Flow / Edges

§

The directed arrows on the diagram to show the 
flow between activities to complete a workflow


10

Vocabulary
Ø


Join

§

A black bar with several flows entering it and 
one leaving it.  All flows going into the join must 
reach it before processing may continue.  This 
denotes the end of parallel processing.


11

Fork – Parallel Activities
Ø A fork is used when multiple activities are 

occurring at the same time

Ø A black bar with one flow going into it and several 

leaving it


12

Vocabulary of Activity Diagram
Ø

Branch ­ Decision:

§


The branch describes what activities will take 
place based on a set of conditions.

§

It is represented by a diamond with one flow 
entering and several leaving.  The flows leaving 


13

Ø

Merging

§

A diamond with several flows entering and one 
leaving.  The implication is that one or more 
incoming flows must reach this point until 
processing continues, based on any guards on the 
outgoing flow.


14

Basic Vocabulary
Ø


Activity Final Node
§

The filled circle with a border is the ending point.  
An activity diagram can have zero or more activity 
final nodes.


15

Rule of Activity Diagram
Ø

After the merge all of the parallel activities must 
be combined by a join before transitioning into 
the final activity state.   


16

Pictorial Representation of Vocabulary of 
Activity Diagram


17


18

Problem Statement



19

Non­Computer Science Scenario
Ø

Consider the workflow associated with building a house. 
First, you select a site. Next, you commission an architect 
to  design  your  house.  After  you've  settled  on  the  plan, 
your  developer    asks  for  bids  to  price  the  house.  Once 
you agree on a price and a plan, construction can begin. 
Permits are secured, ground is broken, the foundation is 
poured,  the  framing  is  erected,  and  so  on,  until 
everything  is  done.  You're  then  handed  the  keys  and  a 
certificate  of  occupancy,  and  you  take  possession  of  the 
house


20


21

Problem Statement


22

Ø


In an order processing system, once the order is 
received multiple activities are initiated to 
complete the order process. On one side order 
filing is initiated and on the other end billing  
mechanism is initiated to receive the payment.  
On the order filing side delivery mechanism is 
finalized whether it is a rush delivery or regular 
delivery. In the end all the activities end to close 


23

Possible Solution


24

Swim Lanes
Ø

At times it useful, especially when you are 
modeling workflows of business processes, to

   partition the activity states on an activity diagram 
into groups

Ø

Ø


Each group representing the business 
organization responsible for those activities.
Each group is known as “Swim Lane”


25


×