Software Design

Table of Contents

Modeling behavior with UML State Machines

Introduction

every object has finite set of states during life.

state machine diagram is used to:

Simple example

States

states are the nodes of state machine

when a state is active:

Transitions

change from one state to another

Transition diagram

Syntax of transitions:

Syntax of transitions

Types:

Timing of transitions:

Table of transition timing

Types of events

A change event is permanently checked. A guard is only checked when the event occurs.

Types of states

Initial state:

Final state:

Terminate node:

Decision node:

Parallelization node:

Synchronization node:

Composite state:

Composite state diagram

Orthogonal state:

Orthogonal state diagram

Submachine state (SMS)

Submachine state diagram

History state:

Entry and exit points

Encapsulation mechanism: a composite state shall be entered/exited via a state other than initial and final states.

external transition must/need not know structure of composite state.