Activity Diagrams. Recap Activity Diagrams – When to use? – Where? – Nodes – Edges – More to come …. 2.

Slides:



Advertisements
Similar presentations
Nested state diagrams:Problems with flat state diagram
Advertisements

UML State chart/machine diagram State machine diagram is a behavior diagram which shows discrete behavior of a part of designed system through finite state.
Activity Diagrams in UML. Definition Activity diagrams represent the dynamics of the system. They are flow charts that are used to show the workflow of.
Software Design Process A Process is a set of related and (sequenced) tasks that transforms a set of input to a set of output. Inputs Outputs Design Process.
ESE Einführung in Software Engineering 7. Modeling Behaviour Prof. O. Nierstrasz.
Introduction to Software Engineering 7. Modeling Behaviour.
Information System Design IT60105
® IBM Software Group © 2006 IBM Corporation Rational Software France Object-Oriented Analysis and Design with UML2 and Rational Software Modeler 04. Other.
1 Chapter 4 Dynamic Modeling and Analysis (Part I) Object-Oriented Technology From Diagram to Code with Visual Paradigm for UML Curtis H.K. Tsang, Clarence.
7M701 1 Activity Diagram. 7M701 2 Example 7M701 3 Activity Diagram: what is it? Describes activities and flows of data or decisions between activities.
1 Activity diagrams in UML 2.0 Debenedetti Emanuele.
UML Activity Diagrams In UML an activity diagram is used to display the sequence of actions They show the workflow from start to finish Detail the many.
University of Toronto Department of Computer Science © Steve Easterbrook. This presentation is available free for non-commercial use with attribution.
1 CS 426 Senior Projects Chapter 14: Activity Diagrams [Arlow and Neustadt, 2005] February 17, 2009.
7M822 UML Activity Diagrams 6 October 2008.
Advanced Behavioral Modeling
SE-565 Software System Requirements More UML Diagrams.
An Introduction to Rational Rose Real-Time
Department of Computer Science 1 CSS 496 Business Process Re-engineering for BS(CS)
Department of Computer Science 1 CSS 496 Business Process Re-engineering for BS(CS)
Software Design Processes and Management
Karolina Muszyńska Based on: S. Wrycza, B. Marcinkowski, K. Wyrzykowski „Język UML 2.0 w modelowaniu SI”
Software Engineering EKT 420. What is Activity Diagram Activity diagrams are graphical representations of workflows of stepwise activities and actions.
Interaction Modeling. Sequence Models  There are two kinds of sequence models: scenarios and sequence diagrams  A scenario is a sequence of events that.
Chapter 10 Architectural Design
Lecture 4 Finite State Machine CS6133 Software Specification and Verification.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour.
UML / UML 2.0 Diagrams (Part III) 1. Sequence diagram is the most common kind of interaction diagram. It focuses on the message interchange between a.
Business Informatics Group Institute of Software Technology and Interactive Systems Vienna University of Technology Favoritenstraße 9-11/188-3, 1040 Vienna,
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 21. Review ANALYSIS PHASE (OBJECT ORIENTED DESIGN) Functional Modeling – Use case Diagram Description.
Behavioral diagrams Lecture p4 T120B pavasario sem.
Interaction Models (2): Sequence Diagrams Extracted from textbook: Object Oriented Modeling and Design with UML M. Blaha, J. Rumbaugh 1.
1 Devon M. Simmonds University of North Carolina, Wilmington CSC450 Software Engineering WorkFlow Modeling with Activity Diagrams.
Business Informatics Group Institute of Software Technology and Interactive Systems Vienna University of Technology Favoritenstraße 9-11/188-3, 1040 Vienna,
UML Unified Modeling Language. Credits Wolfgang Pelz uml-diagrams.org Emanuele Debenedetti.
Requirements as Usecases Capturing the REQUIREMENT ANALYSIS DESIGN IMPLEMENTATION TEST.
Activity diagrams. Introduction ● Activity diagrams are a behavioural model that represent the dynamics of the system. ● An activity diagram is essentially.
Smith’s Aerospace © P. Bailey & K. Vander Linden, 2005 Interaction and Communication Diagrams Patrick Bailey Keith Vander Linden Calvin College.
System Testing Beyond unit testing. 2 System Testing Of the three levels of testing, system level testing is closest to everyday experience We evaluate.
Systems Analysis and Design in a Changing World, 6th Edition 1 Chapter 5 INTRODUCTION TO SYSTEMS ANALYSIS AND DESIGN: AN AGILE, ITERATIVE APPROACH CHAPTER.
Chapter 11 Activity Diagrams. 2 “Activity diagrams are a technique to describe procedural logic, business processes, and work flows” - M. Fowler An activity.
State Modeling. Introduction A state model describes the sequences of operations that occur in response to external stimuli. As opposed to what the operations.
CS212: Object Oriented Analysis and Design Lecture 34: UML Activity and Collaboration diagram.
CS3773 Software Engineering Lecture 06 UML State Machines.
Marlon Dumas University of Tartu
Chapter 14: Activity Diagrams November 2015 [Arlow and Neustadt, 2005] CS 425/625 Senior Projects University of Nevada, Reno Department of Computer Science.
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 10: Statecharts.
UML Activity Diagrams.
Chapter 3: Introducing the UML
Modeling Object Lifecycles and State-Dependent Behavior ©SoftMoore ConsultingSlide 1.
Fortran: Control Structures Session Three ICoCSIS.
 Activity diagram is basically a flow chart to represent the flow from one activity to another activity.
UML ACTIVITY DIAGRAM 1. Recap Formal Use Case diagram UML notation for use cases Examples 2.
® IBM Software Group © 2010 IBM Corporation IBM Rational Rhapsody Advanced Systems Training v7.5 Advanced Activity Modeling.
UML (Unified Modeling Language)
State Modeling. Introduction A state model describes the sequences of operations that occur in response to external stimuli. As opposed to what the operations.
Cliquez pour modifier le style du titre Cliquez pour modifier les styles du texte du masque Deuxième niveau Troisième niveau Quatrième niveau Cinquième.
Systems Analysis and Design in a Changing World, Fourth Edition
ACTIVITY DIAGRAMS 《UML面向对象建模基础》.
Information Delivery Manuals: Process Mapping
Activity Diagram.
Activity and State Transition Diagram
State Machine Diagrams
UML Activity Diagrams & State Charts
Chapter 14: Activity Diagrams
BPMN - Business Process Modeling Notations
Chapter 14: Activity Diagrams
CHAPTER 2 Object-Oriented Modeling Using UML (Continued)
Chapter 14: Activity Diagrams
UNIT 3 UNIT 3 DYNAMIC MODELING Coming up: Interaction Diagrams.
Presentation transcript:

Activity Diagrams

Recap Activity Diagrams – When to use? – Where? – Nodes – Edges – More to come …. 2

Object nodes Hold data temporarily while they wait to move through the graph Specify the type of values they can hold (if no type is specified, they can hold values of any type) Can also specify the state of the held objects There are four kinds of object nodes: 3 Pins (three differents notations) Activity Parameter Nodes Central Buffer Nodes Data Store Nodes

Object nodes – CentralBuffer A central buffer node is an object node that manages flows from multiple sources and destinations (as opposed to pins and parameters) Acts as a buffer for multiple input flows and output flows Is not tied to an action like pins, or to an activity like activity parameter nodes 4 The centralBuffer node collects the object Parts, and each Part can be used or packet (but not both)

Object nodes – Datastore Is a specific central buffer node which stores objects persistently Keeps all tokens that enter into it Tokens chosen to move downstream are copied so that tokens never leave the data store If arrives a token containing an object already present in the data store, this replaces the old one Tokens in a data store node cannot be removed (they are removed when the activity is terminated) 5

Object nodes - Multiplicities and upper Bound Multiplicities: specify the minimum (≥0) and maximum number of values each pin accepts or provides at each invocation of the action: – when is available the minimum number of values, the action can start – if there is more values than the maximum, the action takes only the first maximum value UpperBound: shows the maximum number of values that an object node can hold: at runtime, when the upper bound has been reached, the flow is stopped (buffering) 6

Object nodes – Effect and ordering Effect: pins can be notated with the effect that their actions have on objects that move through the pin The effects can be: ‘create’ (only on output pins), ‘read’, ‘update’ or ‘delete’ (only on input pins) Ordering: specifies the order in which the tokens of an object node are offered to the outgoing edges (FIFO, LIFO or modeler-defined ordering) 7

Activity edges – Presentation options An edge can also be notated using a connector Every connector with a given label must be paired with exactly one other with the same label on the same activity diagram 8 is equivalent to To reduce clutter in complex diagrams, object nodes may be elided is equivalent to

Activity edges - Transformation It is possible to apply a transformation of tokens as they move across an object flow edge (each order is passed to the transformation behaviour and replaced with the result) 9 In this example, the transformation gets the value of the attribute Customer of the Order object > transformation specification

Selection Specifies the order (FIFO, LIFO or modeler-defined ordering) in which tokens in the node are offered to the outgoing edges Can be applied to: – Object node - specifies the object node ordering, choosing what token offers to the outgoing edge whenever it asks a token – Edge - chooses the order on which tokens are offered from the source object node to the edge (overrides any selection present on the object node, that is object node ordering) 10

Token competition A parameter node or pin may have multiple edges coming out of it, whereupon there will be competition for its tokens, because object nodes cannot duplicate tokens while forks can Then there is indeterminacy in the movement of data in the graph 11 If the input pin of Paint at Station 1 is full, the token remains at the output of Make Part until the traversal can be completed to one of the input pins

ActivityPartition (1) Partitions divide the nodes and edges for identifying actions that have some characteristics in common They often correspond to organizational units in a business model Partitions can be hierarchical and multidimensional Additional notation is provided: placing the partition name in parenthesis above the activity name 12

ActivityPartition (2) 13 Partition notated to occur outside the primary concern of the model

Pre & post condition (1) Can be referred to an activity or to an action (local condition) UML intentionally does not specify when or whether pre/post conditions are tested (design time, runtime, etc.) UML also does not define what the runtime effect of a failed pre/post condition should be (error that stops execution, warning, no action) 14

Pre & post condition (2) 15

SendSignalAction Creates a signal instance from its inputs, and transmits it to the target object (local or remote) A signal is an asynchronous stimulus that triggers a reaction in the receiver in an asynchronous way and without a reply Any reply message is ignored 16

Time triggers and Time events A Time trigger is a trigger that specifies when a time event will be generated Time events occur at the instant when a specified point in time has transpired This time may be relative or absolute – Relative time trigger: is specified with the keyword ‘after’ followed by an expression that evaluates to a time value – Absolute time trigger: is specified as an expression that evaluates to a time value 17 Jan, 1, 2000, Noon after (5 seconds) Relative time triggerAbsolute time trigger

AcceptEventAction Waits for the occurrence of an event meeting specified conditions Two kinds of AcceptEventAction: – Accept event action – accepts signal events generated by a SendSignalAction – Wait time action – accepts time events Accept event action Wait time action

19 The objects stored in Personnel are only retrieved when the join succeeds (only once a year)

InterruptibleActivityRegion Is an activity group (sets of nodes and edges) that supports termination of tokens flowing into it When a token leaves an interruptible region via interrupting edges, all tokens and behaviours in the region are terminated Token transfer is still atomic: a token transition is never partial; it is either complete or it does not happen at all (also for internal stream)

InterruptibleActivityRegion 21 Interrupting edge

Exceptions (1) Exception handler - specifies the code to be executed when the specified exception occurs during the execution of the protected node When an exception occurs the set of execution handlers on the action is examined to look for a handler that matches (catches) the exception If the exception is not caught, it is propagated to the enclosing protected node, if one exists If the exception propagates to the topmost level of the system and is not caught, the behaviour of the system is unspecified; profiles may specify what happens in such cases 22

Exceptions (2) When an exception is caught, is executed the exception body instead of the protected node, and then the token is passed to all the edges that go out from that protected node The exception body has no explicit input or output edges Exception body can resolve the problems that have caused the exception or can abort the program We can put any activities nested in a protected node (in UML 2.0, nesting activities is allowed) 23 Successful end Protected node with two nested activities HandlerBody node

ExpansionRegion (1) Nested region of an activity in which each input is a collection of values The expansion region is executed once for each element (or position) in the input collection On each execution of the region, an output value from the region is inserted into an output collection at the same position as the input elements 24

ExpansionRegion (2) There are three ways of interaction between the executions: – Parallel (concurrent): all the interactions are independent – Iterative: the interactions occur in the order of the elements (the executions of the region must happen in sequence, with one finishing before another can begin) – Stream (streaming): there is a single execution of the region, where the values in the input collection are extracted and placed into the execution of the expansion region as a stream (in order if the collection is ordered) 25

Activity diagrams describe the activities of a class. These diagrams are similar to state chart diagrams and use similar conventions, but activity diagrams describe the behavior of a class in response to internal processing rather than external events as in state chart diagram. Swim lanes, which represent responsibilities of one or more objects for actions within an overall activity; that is, they divide the activity states into groups and assign these groups to objects that must perform the activities. Swim Lane 26

Activity Diagrams: Swim lanes 27 Open Incident Allocate Resources Coordinate Resources Document Incident Archive Incident Dispatcher FieldOfficer Actions may be grouped into swim lanes to denote the object or subsystem that implements the actions.

Receive Order Check Order Item Dispatch Order Authorize Payment Cancel Order Add Remainder to Stock [succeeded] [failed] Assign to Order Receive Supply Choose Outstanding Order Items Assign to Order * for each chosen order item [in stock] *for each order item [need to reorder] Reorder item [all outstanding order items filled] [stock assigned to all order items and payment authorized] Order Processing Finance Stock Manager vertical lines are used to separate “swimlanes” to show which activities are handled by which part of the system 28

Summary Object Nodes – Activity Parameter, Pins, Central Buffer, Data Stores – Multiplicities, upper bound, effect, ordering Activity Edges – Labels, transformations, selection Activity partitioning Pre/Post conditions Event actions – SendSignalAction, AcceptEventAction, WaitTimeAction, Time trigger and time events Interruptible activity region Expansion region Swim lane diagrams