410 likes | 558 Views
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
E N D
Devon M. Simmonds University of North Carolina, Wilmington WorkFlow Modeling with Activity Diagrams CSC450Software Engineering
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
LINK UML Specification UML 2.* Diagram Types • Use case diagrams • Class diagrams • Activity diagrams • State machines • Sequence diagrams • Object diagrams • Component diagrams • Deployment diagrams • Package diagrams • etc. 14 types altogether
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
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.
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)
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
System Engineering • Software Lifecycle Activities Software Design Requirements Analysis Implementation System Engineering Testing Deployment Evolution Workflow modelling is done during System Engineering
Activity Diagrams: An Introduction to Business Workflow Modeling Slides adapted from slides created by Robert B. France
Workflow Modeling • Workflow modeling is performed by: • Gathering data using interviews, etc. • Analyzing the information • Modeling the information using an activity diagram.
Activity Models:describing business work flows Activity diagram of an order processing system
Join Fork Decision node Merge node Initial node Flow final node Activity final node Activity Models An Activity diagram • 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.
Key Activity Model symbols Join Fork Decision node Merge node Flow final node Initial node Activity final node
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.
Activity Diagrams:describing business work flows Activity diagram of an order processing system
Activity Diagrams: actions with constraints Format of Actions An Example
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.
Example of an edge with a name Edges OR
Edges with Weights Cricket team example Proposal bids example
Activity Models: activity notation An activity is a structure of actions
Modeling activities An activity is a structure of actions
Another example [else]
Expanding Activities OR Expanding an activity / invoking an activity with nodes and edges.
Activity expanded Expanding activities
Activity Final Nodes Employee expense reimbursement process
Input/Output pins A pin represent an input or output data node
Activity Diagram Example Allocate Resources Open Request Coordinate Resources Archive Request Document Incident Resource Management
Activity Model Exercise • Develop an Activity Diagram for requesting money from an ATM machine.
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.
Guidelines for Creating Activity Diagrams • 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. • You must identify the activities, control flows, and object flows that occur between the activities. • You should identify any decisions that are part of the process being modeled. • You should attempt to identify any prospects for parallelism in the process. • You should draw the activity diagram.
Summary • What did we discuss in this class period? • …
Qu es ti ons? Summary • What’s coming next class? ______________________ Devon M. Simmonds Computer Science Department University of North Carolina Wilmington _____________________________________________________________