Activity Diagrams - PowerPoint PPT Presentation

1 / 11
About This Presentation
Title:

Activity Diagrams

Description:

Changes to values of one or more attributes or. Return of a value to an object ... UML symbol is the same for both activity and action ( a lozenge) Activity or action? ... – PowerPoint PPT presentation

Number of Views:29
Avg rating:3.0/5.0
Slides: 12
Provided by: madhu9
Category:

less

Transcript and Presenter's Notes

Title: Activity Diagrams


1
Activity Diagrams
  • Describing Flows

2
Some terms
  • Activity
  • Something an object performs on an ongoing basis
  • Non-atomic
  • Can be interrupted
  • Can be decomposed into sub-activities
  • Actions
  • Set of executable computations
  • Results in
  • Changes to values of one or more attributes or
  • Return of a value to an object
  • Cannot be interrupted
  • UML symbol is the same for both activity and
    action ( a lozenge)

3
Activity or action?
  • Calculate shipping costs
  • Update customer preferences
  • shipCostcountryCodesubTotal
  • Ship Order
  • isDeliveredYes

4
Notation
  • Diagrams are read from top to bottom
  • Forks and branches
  • branches and forks to describe conditions and
    parallel activities
  • A fork is used when multiple activities are
    occurring at the same time
  • A branch is a decision point

5
Branching and Merging
  • Branch is a decision point where there is more
    than one possible path for the activity
  • Merge is a point where multiple branches come
    back together
  • Represented by
  • Both merge and branch use same notation

6
Branching and Guard conditions
  • Each path out of a branch has a guard condition
  • Guard condition
  • Boolean expression that evaluates to True or
    False
  • Collection of all possible branches must cover
    all possibilities
  • Sometimes, else is used to cover all bases
  • Guard conditions cannot overlap (mutually
    exclusive)
  • Guard condition shown in square brackets

7
Example of branches and merges
8
Forks and Joins
  • Fork
  • Splitting of flow of control to two more flows of
    control
  • Each flow is independent and concurrent
  • Joins is the synchronization (or joining) of two
    or more flows into one
  • Symbol for both is a synchronization bar

9
Identify the forks, joins and synchronization bars
10
Swimlanes
  • Activities and actions grouped by vertical lines
  • Each pair of lines delineates the swimlane
    associated with a particular object.

11
SWIMLANES
Accounting
Marketing
Shipping
Retrieve books from inventory
Update Customer Preferences
Post Ledger Item
Compute Subtotal
Look up country code
ship abroad
ship within US
shipCostcountrysubTotal
shipCostregionsubTotal
Compute new subtotal
Write a Comment
User Comments (0)
About PowerShow.com