csc450 software engineering

41
CSC CSC 450 1 Devon M. Simmonds University of North Carolina, Wilmington CSC450 Software Engineering WorkFlow Modeling with Activity Diagrams

Upload: hanna-riggs

Post on 01-Jan-2016

39 views

Category:

Documents


1 download

DESCRIPTION

Devon M. Simmonds University of North Carolina, Wilmington. WorkFlow Modeling with Activity Diagrams. CSC450 Software Engineering. Review. What is UML?. A popular, standardized modeling language for object-oriented software - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: CSC450 Software Engineering

CSC450CSC450

1

Devon M. SimmondsUniversity of North Carolina,

Wilmington

CSC450Software

Engineering

WorkFlow Modeling with Activity Diagrams

Page 2: CSC450 Software Engineering

CSC450CSC450

2

Review

Page 3: CSC450 Software Engineering

CSC450CSC450

3

What is UML?

A popular, standardized modeling language for object-oriented software

The Object Management Group (OMG) is the group that dictates the UML standard

Created by Grady Booch, James Rumbaugh, and Ivar Jacobson

Page 4: CSC450 Software Engineering

CSC450CSC450

4

Use case diagrams Class diagrams Activity diagrams State machines Sequence diagrams Object diagrams Component diagrams Deployment diagrams Package diagrams etc. 14 types altogether

UML 2.* Diagram Types

UML SpecificationLINK

Page 5: CSC450 Software Engineering

CSC450CSC450

5

UML Diagram Classification Static/functional

This characteristic defines the structural aspect of the system.

Dynamic/behavioral: Defines the behavioral features of the

system Implementation:

These are used to describe the elements required for deploying the system

Page 6: CSC450 Software Engineering

CSC450CSC450

6

UML Diagrams Static

Use Case Diagram (functional) Describes what a system does. Focus on what rather than how Uses scenarios to sum up a task or goal Is made up of actors and use cases

Class Diagrams (static) Overview of system as a whole Shows its classes and the relationships among them

Relationships can be association, aggregation, generalization Class represented by rectangle diagram containing class name,

attributes, and operations Object Diagram (static/implementation)

Show instances rather than classes Useful in showing complicated relationships, such as recursive ones Uses rectangles with instanceName:className at top

Package Diagrams Shows structural relationships between subsystems.

Page 7: CSC450 Software Engineering

CSC450CSC450

7

UML Diagrams Dynamic

State Diagram Shows the possible states of the object and the transitions

that cause a change in the state Uses rounded rectangles with name of the state it’s

currently in at top Activity Diagram

I will be discussing this in detail, so I’ll skip it for now Sequence Diagram

Shows the details of how an operation is carried out Details what messages are sent and when Organized according to time Uses rectangles with object name on top

Collaboration Diagram Similar to sequence diagrams, but they focus on object roles

rather than time Uses rectangles with objectName:className (objectName is

optional)

Page 8: CSC450 Software Engineering

CSC450CSC450

8

UML Diagrams

Implementation Component Diagram

Provides a physical view of the system Used to show dependencies software has

on other software components Deployment Diagram

Shows how the system will be physically deployed in the hardware environment

Page 9: CSC450 Software Engineering

CSC450CSC450

9

System Engineering

Software Lifecycle Activities

System Engineering

Requirements Analysis

Software Design

Implementation

Testing

Deployment

Evolution

Workflow modelling is done during System Engineering

Page 10: CSC450 Software Engineering

CSC450CSC450

10Slides adapted from slides created by Robert B. France

Activity Diagrams: An Introduction to Business Workflow Modeling

Page 11: CSC450 Software Engineering

CSC450CSC450

11

Workflow Modeling Workflow modeling is performed by:

Gathering data using interviews, etc. Analyzing the information Modeling the information using an activity

diagram.

Page 12: CSC450 Software Engineering

CSC450CSC450

12

Activity Models: describing business work flows

Activity diagram of an order processing system

Page 13: CSC450 Software Engineering

CSC450CSC450

13

Activity Models

An activity is a structure of actions containing:

Action nodes – may have incoming and outgoing activity edges representing data flow or control flow

Object nodes – represents artifacts produced by actions

Control nodes – used to manage and order action and object nodes.

An Activity diagram

Decision nodeMerge node

Initial node

Activity final node

Flow final node

Join Fork

Page 14: CSC450 Software Engineering

CSC450CSC450

14

Key Activity Model symbols

Initial node

Decision nodeMerge node

Activity final node

Flow final node

JoinFork

Page 15: CSC450 Software Engineering

CSC450CSC450

15

Drawing ActivityDiagrams

Branches and forks describe conditions and parallel activities. 

A fork is used when multiple activities are occurring at the same time. 

activity2 and activity3 are occurring at the same time. 

After activity2 there is a branch.  The branch describes what activities will take place based on a set of conditions. 

All branches at some point are followed by a merge to indicate the end of the conditional behavior started by that branch.  

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

Page 16: CSC450 Software Engineering

CSC450CSC450

16

Activity Diagrams: describing business work flows

Activity diagram of an order processing system

Page 17: CSC450 Software Engineering

CSC450CSC450

17

Activity Diagrams: actions with constraints

Format of Actions

An Example

Page 18: CSC450 Software Engineering

CSC450CSC450

18

Accept/Request Signals

Accept signal indicating cancellation of an order Acceptance of the signal invoke the cancellation

behavior Action is enabled on entry on the activity containing

it.

Request signal sent after an order is processed Activity waits to receive a payment confirmed

signal. When confirmation is received, the order is shipped Acceptance of payment confirmed signal is enabled

only after request for payment is sent.

Page 19: CSC450 Software Engineering

CSC450CSC450

19

Edges

OR

Example of an edge with a name

Page 20: CSC450 Software Engineering

CSC450CSC450

20

Edges with Weights

Proposal bids example

Cricket team example

Page 21: CSC450 Software Engineering

CSC450CSC450

21

Activity Models: activity notation

An activity is a structure of actions

Page 22: CSC450 Software Engineering

CSC450CSC450

22

Modeling activities

An activity is a structure of actions

Page 23: CSC450 Software Engineering

CSC450CSC450

23

Another example

[else]

Page 24: CSC450 Software Engineering

CSC450CSC450

24

Expanding Activities

Expanding an activity / invoking an activity with nodes and edges.

OR

Page 25: CSC450 Software Engineering

CSC450CSC450

25

Expanding activities

Activity expanded

Page 26: CSC450 Software Engineering

CSC450CSC450

26

Connectors

Page 27: CSC450 Software Engineering

CSC450CSC450

27

Activity Final Nodes

Employee expense reimbursement process

Page 28: CSC450 Software Engineering

CSC450CSC450

28

Activity Final Nodes vs. Flow Final Nodes

Page 29: CSC450 Software Engineering

CSC450CSC450

29

Partitions/Swimlanes

Page 30: CSC450 Software Engineering

CSC450CSC450

30

Partitions using annotations

Page 31: CSC450 Software Engineering

CSC450CSC450

31

Dimensional partitions

Page 32: CSC450 Software Engineering

CSC450CSC450

32

Timers

Page 33: CSC450 Software Engineering

CSC450CSC450

33

Interrupts

Page 34: CSC450 Software Engineering

CSC450CSC450

34

Input/Output pinsA pin represent an input or output data node

Page 35: CSC450 Software Engineering

CSC450CSC450

35

Exceptions

Page 36: CSC450 Software Engineering

CSC450CSC450

36

Activity Diagram Example

OpenRequest

DocumentIncident

AllocateResources

CoordinateResources

ArchiveRequest

Resource Management

Page 37: CSC450 Software Engineering

CSC450CSC450

37

Activity Model Exercise

Develop an Activity Diagram for requesting money from an ATM machine.

Page 38: CSC450 Software Engineering

CSC450CSC450

38

Using Activity Diagrams Activity diagrams should be used in

conjunction with other modeling techniques such as interaction diagrams and state machines.

Primary reason: Modeling the flow of activities through a system.  Useful for analyzing a use case by describing what

actions need to take place and when they should occur.

Useful for  describing a complicated sequential algorithm.

Useful for modeling applications with parallel processes.

Activity diagrams do not give detail about how objects behave or how objects collaborate. 

However, activity diagrams should not take the place of interaction diagrams and state machines. 

Page 39: CSC450 Software Engineering

CSC450CSC450

39

Guidelines for Creating Activity Diagrams

1. Since an activity diagram can be used to model any kind of process, you should set the context or scope of the activity being modeled. Once you have determined the scope, you should give the diagram an appropriate title.

2. You must identify the activities, control flows, and object flows that occur between the activities.

3. You should identify any decisions that are part of the process being modeled.

4. You should attempt to identify any prospects for parallelism in the process.

5. You should draw the activity diagram.

Page 40: CSC450 Software Engineering

CSC450CSC450

40

Summary What did we discuss in this class

period? …

Page 41: CSC450 Software Engineering

CSC450CSC450

41

Summary What’s coming next class?

______________________Devon M. Simmonds

Computer Science Department

University of North Carolina Wilmington

_____________________________________________________________

Qu es ti ons?