1 / 21

Object-oriented modeling Activity diagrams

Object-oriented modeling Activity diagrams. Karolina Muszyńska. Based on : S. Wrycza, B. Marcinkowski, K. Wyrzykowski „Język UML 2.0 w modelowaniu SI”. Object Modeling. Dynamic view – activity diagrams role basic concepts advanced concepts examples. Activity Diagrams – role.

howe
Télécharger la présentation

Object-oriented modeling Activity diagrams

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Object-oriented modelingActivity diagrams Karolina Muszyńska Based on: S. Wrycza, B. Marcinkowski, K. Wyrzykowski „Język UML 2.0 w modelowaniu SI”

  2. Object Modeling • Dynamic view – activity diagrams • role • basic concepts • advanced concepts • examples

  3. Activity Diagrams –role ActivityDiagrams – a kind of UML diagrams describing the dynamics of the system. They graphically describe the sequential and/or parallel control flows and data flows among orderly arranged activities, actions and objects. Activity diagrams show the workflow from a start point to the finish point detailing the many decision paths that exist in the progression of events contained in the activity. Activity diagrams are useful for business modeling where they are used for detailing the processes involved in business activities.

  4. Activity Diagrams –basic concepts Activity - activity represents a business process; fundamental elements of the activity are actions and control elements (decision, division, merge, initiation, end, etc.) Elements are connected by so-called “activity edges” and form the “control flow” or ‘flow’. The execution of an activity can contain parallel flows. Edge (Control Flow) - edges, represented by arrows, connect the individual components of activity diagrams and illustrate the control flow of the activity. A name can be attached to an edge.

  5. Activity Diagrams – basic concepts Action is an individual step within an activity. The action can possess input and output information. Specific actions are calling other actions, receiving an event, and sending signals. Initial Node - the initial node is the starting point of an activity. Usually there is only one initial node but in complex real-time systems there may be more initial nodes, which means that several flows start at the beginning of an activity. It is also possible that an activity has no initial node, but is initiated by an event.

  6. Activity Diagrams – basic concepts Activity Final Node - the activity final node indicates that an activity is completed. An activity diagram can have more than one exit in the form of activity final nodes. If several parallel flows are present within an activity, all flows are stopped at the time the activity final node is reached. Flow Final Node - a flow final node terminates a flow. Unlike the activity final node, which ends an entire activity, reaching a flow final node has no effect on other parallel flows that are being processed within the activity at the same point in time. In this way, parallel flows can be terminated individually and selectively.

  7. Activity Diagrams –basic concepts Initial Node Edge/Control Flow Activity Activity Activity Final Node

  8. Activity Diagrams – advanced concepts Decision Node – a conditional branch point or decision node, represented by a diamond. A decision node has one input and two or more outputs. Each output has a condition attached to it, which is written in brackets. If a condition is met, the flow proceeds along the appropriate output. An ‘else’ output can be defined along which the flow can proceed if no other condition is met. Merge Node - a diamond which has several inputs and only one output. Its purpose is the merging of flows. The inputs are not synchronized; if a flow reaches such a node it proceeds at the output without waiting for the arrival of other flows.

  9. Activity Diagrams – examples Decision Node Decomposed activity

  10. Activity Diagrams – advanced concepts Activity diagram for the decomposed activity Merge Node

  11. Activity Diagrams – advanced concepts Fork - for the branching of flows in two or more parallel flows we use a synchronization bar, which is depicted as a thick horizontal or vertical line. Branching allows parallel flows within activities. A fork has one input and two or more outputs. Join - for the consolidation of two or more parallel flows we also use a synchronization bar, which is depicted as a thick horizontal or vertical line. During consolidation synchronization takes place, meaning the flow proceeds only after all incoming flows have reached the consolidation point. Join has two or more inputs and one output.

  12. Activity Diagrams – advanced concepts • Data flow – flow of data between an object and activities or actions effecting this object. Objects and data flows are inserted within an activity diagram in the following situations: • we want to indicate the responsibility of an object, • we want to depict the flow of the object, • the state of the object is changed.

  13. Activity Diagrams – advanced concepts Data flow Object Fork Join

  14. Activity Diagrams – advanced concepts Activity Partition - the individual elements of an activity diagram can be divided into individual areas or ‘partitions’. Various criteria can lead to the creation of these partitions: organization entities, cost centers, locations, etc. Individual steps of an activity will be assigned to these partitions. Each partition is set apart from its neighboring partition by a horizontal or vertical continuous line; from this stems the term swim lanes. Each partition receives a name. Partitions can be arranged in a two-dimensional manner; in this case the activity diagram is divided into individual cells like a grid.

  15. Activity Diagrams – advanced concepts Activity partitions

  16. Activity Diagrams – advanced concepts Call ActivityAction- an activity can be called from within another activity. Calling, in itself, is an action; the outcome of the call is another activity. In this way, activities can be nested within each other and can be represented with different levels of detail. Accept Event Action - this action waits for an event to occur. After the event is accepted, the flow that comes from this action (and is defined in the activity diagram) is executed. Many business processes are initiated by events, for example, processing an order by the receipt of an order, or delivery by the receipt of a payment.

  17. Activity Diagrams – advanced concepts Accept Time Event Action - at a definite point in time, this action starts a flow in the activity diagram. An hourglass symbol can be used to represent the acceptance of a time event. A typical example of a time event is triggering reminders after the deadline for payment has passed. Send Signal Action – is an action that creates a signal which is sent to an accepting activity. The accepting activity accepts the signal with the action “accept an event” and can react accordingly, meaning according to the flow that originates from this node in the activity diagram.

  18. Activity Diagrams – advanced concepts Expansion Region - is a structured activity region (defined fragment of a diagram), with clearly specified inputs and outputs, performed repeatedly, accordingly to the number of elements in the input. Interruptible Activity Region - surrounds a group of actions that can be interrupted, as a result of the interruption flow. Exception handler - outlines the activities that should be executed if the specified exception occurs during execution of a protected action.

  19. Activity Diagrams – advanced concepts Expansion region

  20. Activity Diagrams – advanced concepts Interruptible Activity Region Except event action Except time event action Exceptionhandler

  21. Building an Activity Diagram • Identification of basic activities based on use case scenario, • Connecting activities using control flows, • Optional decomposition of activities, • Identification of decision flows and parallel control flows, • Introduction of data flows, • Identification of criteria and partitions of the diagram, • Introduction of expansion and interruptible regions, • Introduction of exception handlers.

More Related