csc450 software engineering
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 PresentationTRANSCRIPT
CSC450CSC450
1
Devon M. SimmondsUniversity of North Carolina,
Wilmington
CSC450Software
Engineering
WorkFlow Modeling with Activity Diagrams
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
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
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
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.
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)
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
CSC450CSC450
9
System Engineering
Software Lifecycle Activities
System Engineering
Requirements Analysis
Software Design
Implementation
Testing
Deployment
Evolution
Workflow modelling is done during System Engineering
CSC450CSC450
10Slides adapted from slides created by Robert B. France
Activity Diagrams: An Introduction to Business Workflow Modeling
CSC450CSC450
11
Workflow Modeling Workflow modeling is performed by:
Gathering data using interviews, etc. Analyzing the information Modeling the information using an activity
diagram.
CSC450CSC450
12
Activity Models: describing business work flows
Activity diagram of an order processing system
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
CSC450CSC450
14
Key Activity Model symbols
Initial node
Decision nodeMerge node
Activity final node
Flow final node
JoinFork
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.
CSC450CSC450
16
Activity Diagrams: describing business work flows
Activity diagram of an order processing system
CSC450CSC450
17
Activity Diagrams: actions with constraints
Format of Actions
An Example
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.
CSC450CSC450
19
Edges
OR
Example of an edge with a name
CSC450CSC450
20
Edges with Weights
Proposal bids example
Cricket team example
CSC450CSC450
21
Activity Models: activity notation
An activity is a structure of actions
CSC450CSC450
22
Modeling activities
An activity is a structure of actions
CSC450CSC450
23
Another example
[else]
CSC450CSC450
24
Expanding Activities
Expanding an activity / invoking an activity with nodes and edges.
OR
CSC450CSC450
25
Expanding activities
Activity expanded
CSC450CSC450
26
Connectors
CSC450CSC450
27
Activity Final Nodes
Employee expense reimbursement process
CSC450CSC450
28
Activity Final Nodes vs. Flow Final Nodes
CSC450CSC450
29
Partitions/Swimlanes
CSC450CSC450
30
Partitions using annotations
CSC450CSC450
31
Dimensional partitions
CSC450CSC450
32
Timers
CSC450CSC450
33
Interrupts
CSC450CSC450
34
Input/Output pinsA pin represent an input or output data node
CSC450CSC450
35
Exceptions
CSC450CSC450
36
Activity Diagram Example
OpenRequest
DocumentIncident
AllocateResources
CoordinateResources
ArchiveRequest
Resource Management
CSC450CSC450
37
Activity Model Exercise
Develop an Activity Diagram for requesting money from an ATM machine.
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.
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.
CSC450CSC450
40
Summary What did we discuss in this class
period? …
CSC450CSC450
41
Summary What’s coming next class?
______________________Devon M. Simmonds
Computer Science Department
University of North Carolina Wilmington
_____________________________________________________________
Qu es ti ons?