3SL: Requirements management and model driven systems engineering from concept to creation.
Cradle®
Login:
Username:
Password:
 
Search:  
Visitor not logged in, You are: Home > Reference > Diagrams > State Chart Diagram
 

State Chart Diagram

Purpose

Classes that are believed to have a distinct lifestyle, that is, which are believed to exhibit or provide different external behaviour in different circumstances, may be augmented by a State Chart Diagram (SCD).

Example

Here is an example State Chart Diagram.

Example State Chart Diagram

Description

An SCD depicts a finite-state-machine that describes how the class responds to different external stimuli. These stimuli are the receipt of messages by instances of the class, in the form of calls of the class's operations.

Dynamic behaviour is described in terms of a set of potentially nested states, the transitions between these states, the events (calls of the class's operations) that trigger these transitions, and actions that are performed, both while transitioning between states, and on entry to, whilst within, and on exit from a state.

Each state has an associated PSpec whose name is the same as the state and whose number is the dot-concatenation of the SCD number (the class name) and the state number. The PSpec for a state in mandatory, because Cradle stores the set of processing for a state not within the SCD, but within the ACTIVITIES frame in each state's PSpec.

The details of a state are shown as a set of lines of the form: condition/operation in which the conditions entry , exit , and do are, by convention, used to represent processing an entry to a state, processing whilst in a state, and processing on exit from a state.

The SCDs will initially show only terse details for states, but as iterative development progresses, the contents of SCDs and their states will become increasingly detailed.

An SCD has one initial state and one (or possibly more) final states. A transition may be to a superstate, in which case the flow of control begins at the initial state symbol nested within the superstate. A superstate may contain more than one set of nested states and transitions, each set separated from all other sets, and each set having its own initial state and final state(s) symbols. These sets are considered to run concurrently.

A transition from a superstate is considered to come from any or all of the states directly within it.

A superstate may have superstates nested within it, each of which may in turn contain states and transitions, and possibly other superstates. As such, it is possible to create a hierarchy of states within an SCD by nesting states inside superstates, and then nesting superstates inside other superstates.

At each level of state nesting, there may be any number of superstates. For example, an SCD may contain some states and two superstates, each with states nested inside it.

There is consequently the concept of a `container' symbol and contained symbols, and the concept of a symbol being directly within its container symbol, and possibly being indirectly within other symbols. If a superstate S1 contains a state A and a superstate S2 , and superstate S2 contains a state B , then B is directly within S2 and indirectly within S1 .

Characteristics

APPEARS IN MODELS

Essential and Implementation

NUMBERING

Each class may have zero or one SCD, which will be numbered and named to match the class. A class's optional SCD therefore augments the description of the class shown in the CD(s) and described in the class's PSpec.

HIERARCHICAL

No

Linkage

STD Linkage

Symbols

Symbol

Name

Description

Definition

Expansion

SCD Comment

Comment

Makes a note anywhere in the diagram. Are always surrounded by * characters.

None

None

SCD Initial State

Initial state

A condition at the beginning of the life of an object or an interaction during which it satisfies some condition, performs some action, or waits for some event.

None

None

SCD Final State

Final state

A condition at the end of the life of an object or an interaction during which it satisfies some condition, performs some action, or waits for some event.

None

None

SCD State

State

A condition during the life of an object or an interaction during which it satisfies some condition, performs some action, or waits for some event.

PSpec

None

SCD Superstate

Superstate

A state that contains other states.

None

None

SCD History Indicator

History indicator

When a transition to a superstate occurs, a History Indicator shows control resumes at the state within the superstate that was current when the superstate was interrupted.

None

None

SCD Picture

Picture

Allows you to choose the location of a GIF or JPEG image to be displayed as a diagram symbol or to be embedded in an existing diagram symbol.

None

None

SCD Transition

Transition

A relationship between two states, indicating that an object in the first state will enter the second state and perform certain specified actions when a specified event occurs, if specified conditions are satisfied.

None

None

 
[Copyright © 3SL 2008 | Last Updated: Fri Jul 25th, 2008 ]
Registered office: 2 Highfield Road, Barrow in Furness, Cumbria, LA14 5PA, Registered in England No. 2153654