uml activity diagrams

Post on 06-May-2015

14.912 Views

Category:

Education

3 Downloads

Preview:

Click to see full reader

DESCRIPTION

A course on UML 2.0 Activity Diagram

TRANSCRIPT

1Spring 2005Specification and Analysis of Information Systems

Eran Toch

erant@tx.technion.ac.il

Analysis and Specification of Information Systems

Spring 2007

Session 9: Activity Diagrams

2

Outline

• Introduction

• Basics– Activities, Tokens, objects, signals

• Structures– Decomposition

3

Modeling Process

Intro | Basics | Structures

PhaseActionsOutcome

InitiationRaising a business needBusiness documents

RequirementsInterviewing stakeholders, exploring the system environment

Organized documentation

SpecificationAnalyze the engineering aspect of the system, building system concepts

Formal specification

DesignDefine architecture, components, data types, algorithms

Formal Specification

ImplementationProgram, build, unit-testing, integrate, documentation

Testable system

Testing & Integration

Integrate all components, verification, validation, installation, guidance

Testing results, Working sys

MaintenanceBug fixes, modifications, adaptationSystem versions

4

Behavior Modeling

Intro | Basics | Structures

CheckoutManager

Order

message: changestatus

Add to cart

Check availability

Supply Order

Notify User

[okay][problem]

Sequence Diagrams Activity Diagrams

Inventory

message: create In process

supplied

Order

State Diagrams

5

Strengths

• Best for modeling complex behavior– Which does not rely on interactions.– Has parallel behavior.

• Examples:– Business workflow (authorizing a loan).– User behavior (login/logout).– Algorithms.

Intro | Basics | Structures

6

Outline

• Introduction

• Basics– Activities, Tokens, objects, signals

• Structures– Decomposition

7

Customer Service Modeling

Intro | Basics | Structures

8

Activity Diagram for Customer Service

Start

Fork

decision

merge

Join Final Node

Action

Intro | Basics | Structures

9

Tokens

• The conceptual model of activity diagrams is based on tokens.

Intro | Basics | Structures

10

Tokens

Each fork node generates tokens, according to the number of paths.

The initial node creates a single token

Each join “collects” all the incoming tokens, producing a token afterwards.

An action requires a token to execute, and produce a token when it ends

Intro | Basics | Structures

11

Object Flows

• Objects describe the interface between actions

Call DataReceive Call Log Call

Receive Call Log Call

Object Flow

PinsCall data

Call data

Intro | Basics | Structures

Initiate Call

Call data

12

Pins

• Pins declare the interface between two actions.

Input Pin

Output Pin

Parameter Transformation

Intro | Basics | Structures

13

Objects with States

• Object nodes allow state change modeling:

Call Data[created]

Receive CallFind Customer

TypeCall Data

[classified]

Intro | Basics | Structures

14

Data Store

• A datastore is a stereotype for an object which stores objects persistently.

All entering tokens are copied so that tokens never leave the data store

If a token already present in the data store, it replaces the old one

Intro | Basics | Structures

15

Catching Signals

Time SignalEvent Signal

Flows when the time expression is true

Flows when an event occurs

Sends an event when a flow enters

Intro | Basics | Structures

16

Example: Volvo Blind Spot Info System (BLIS)

Intro | Basics | Structures

17

BLIS

Intro | Basics | Structures

Camera Behavior

Check Objects in Camera

Is object Detected?[no]

Side Object Detected

[yes]

Safety Controller Behavior

Side Object Detected

Detection data

Alarm Deciding

Side?

Left Alarm Right Alarm

[left] [right]

18

Outline

• Introduction

• Basics– Activities, Tokens, objects, signals

• Structures– Decomposition

19

Final Nodes

the activity is terminated when the first token arrives

the activity is terminated when all tokens in the graph are destroyed

Intro | Basics | Structures

20

• An action can be decomposed into an subactivity.

• The invoked activity graph can be used by many subactivity states.

Decomposition

Input Parameter Final Action

Intro | Basics | Structures

21

Partitions

• Partitions (swimlanes) can group actions by: – class, business unit, person etc…

• Can be multidimensional (not always possible).

RegisterBug

EvaluateImpact

FixBug

RevisePlan

ReleaseFix

TestFix

[ priority = 1]

Management

Support

Engineering

Intro | Basics | Structures

22

Pre / Post Conditions

for Decompositions

for Actions

Intro | Basics | Structures

23

Exceptions

• Exception represent errors and unexpected situations

interruptible region

Exception Edge

What happens to the tokens?

Exception Handler

Intro | Basics | Structures

24

Exception – cont’d

Multiple events

Actions can throw events too

Exception info can be modeled

Multiple event handlers

Intro | Basics | Structures

25

Summary

Activity Diagrams:– Represent workflows– Good for designing activities

Basic Elements– Activities– Objects– Signals

Structures – Tokens– Decomposition– Interfaces

top related