CPSC333 SENG311: Foundations Principles of SE - PowerPoint PPT Presentation

1 / 17
About This Presentation
Title:

CPSC333 SENG311: Foundations Principles of SE

Description:

predecessors finished) Activity diagram shows partial order of activities ... Thick horizontal or vertical bar that signifies parallel or concurrent processes. ... – PowerPoint PPT presentation

Number of Views:18
Avg rating:3.0/5.0
Slides: 18
Provided by: rosejoshua
Category:

less

Transcript and Presenter's Notes

Title: CPSC333 SENG311: Foundations Principles of SE


1
CPSC333 / SENG311 Foundations / Principles of SE
  • Activity Diagrams

2
Activity Diagrams
  • Things to note
  • branch / merge
  • synchronization bars
  • fork / join
  • swim lanes
  • object flow

3
Activity diagrams
  • Used to describe
  • workflow
  • parallel processing
  • Activities
  • conceptual task to be done
  • specification/implementation method of a class
  • Similar to Petri nets

4
Activity Diagrams
  • Special type of state diagram
  • Contains
  • start state
  • stop state
  • activities
  • triggerless transitions unless otherwise stated
    (for branches), once an activity is completed,
    the next sequential activity commences

5
Structure of activity diagrams
Activity
Activity
Activity
synchronization condition
synchronization condition
Activity
6
Synchronization Bars(Forks and Joins)
  • Thick horizontal or vertical bar that signifies
    parallel or concurrent processes.
  • Fork a single flow splits into 2 or more flows
    of parallel activities
  • Join 2 or more flows recombine into a single
    flow of activities
  • Note number of processes out of a fork must
    equal the number of processes into its
    corresponding join.

7
Example of activity diagrams
  • The Coffee Pot

8
Activity diagram
Find coffee
Put coffee
Add water
in filter
to reservoir
Put filter
in machine
Turn on
machine
9
Conditions in activity diagrams
Find coffee
Branch
unguarded transition
Put coffee
Check water
in filter
in reservoir
not enough water
Put water in the reservoir
Put filter
in machine
else
filter with coffee in machine and reservoir
contains water
Turn on
machine
10
Branch and Merge
  • A branch is used to model a decision point
    (if/then/else).
  • A branch point can have several branches, all of
    whose guard conditions must be mutually
    exclusive, to avoid program freeze.
  • Branch conditions must also cover the complete
    set of values for its data world (e.g. one branch
    for lt 12, and the other for gt12)
  • A merge collects all branch points, marking the
    end of the branch. This is optional.

11
Structure of activity diagrams
condition 1
Activity
condition 2
Activity
Activity
  • Strictly UML
  • forks ? joins
  • branch ? merge
  • No synchronization condition

synchronization condition
Activity
12
Swim Lanes
Customer
Sales
Warehouse
Request product
  • Identify responsibilities
  • ExampleModeling workflows for business units

Process order
Pull material
Ship order
13
Object flow
Customer
Sales
Warehouse
Request product
  • Shows output objects and (optionally) their state

Process order
Pull material
oOrder in progress
Ship order
oOrder send
14
Swim Lanes
  • Swim lanes are used to identify the roles, teams,
    groups, or even specific individual objects
    responsible for specific activities. Each lane is
    labeled with a specific role or object.
  • Activities are still in the same order, but are
    drawn under their executors lane.
  • Use synchronization bars to show more than one
    role working on a single activity.

15
Object Flow
  • Object flow specifies the artifact or product of
    a certain activity.
  • Represented as a dependency from the activity to
    the object.
  • An object could be associated with several
    activities, showing the objects state
    transitions as it goes through the activities.

16
Proposed Exercise
  • Define an activity diagram for preparing your
    breakfast
  • Define an activity diagram for your software
    development process that includes the object flow

17
Were Available!
  • Questions?
  • if you have any questions about contents of this
    lecture or other course-related issues, please
    come by during our office hours, or send us email
  • Dr. Joshua MWF, 12-1pm, ICT 548
  • joshuar_at_cpsc.ucalgary.ca
  • Dr. Walker WF, 1-2pm, ICT 546
  • rwalker_at_cpsc.ucalgary.ca
Write a Comment
User Comments (0)
About PowerShow.com