Featured

UML State Machine Diagram

A UML State Machine is a notation for describing the sequence of states an object goes through in response to external events. UML state machines are extensions of the finite state machine model. On one hand, state machines provide notation for nesting states and state machines (i.e., a state can be described by a state machine). On the other hand, state machines provide notation for binding transitions with message sends and conditions on objects. UML state machines are largely based on Harel’s statecharts [Harel, 1987] and have been adapted for use with object models [Douglass, 1999]. UML state machines can be used to represent any Mealy or Moore state machine.
UML State Machine Diagram
Figure uml.06 State Machine Diagram


A state is a condition satisfied by the attributes of an object. For example, an Incident object in FRIEND can exist in four states: Active, Inactive, Closed, and Archived (see Figure uml.06). An active Incident denotes a situation that requires a response (e.g., an ongoing fire, a traffic accident). An inactive Incident denotes a situation that was handled, but for which reports are yet to be written (e.g., the fire has been put out, but damage estimates have not yet been completed). A closed Incident denotes a situation that has been handled and documented.
An archived Incident is a closed Incident whose documentation has been moved to off-site storage. In this example, we can represent these four states with a single attribute in the Incident class—a status attribute that can take any of four values: Active, Inactive, Closed, and Archived. In general, a state can be computed from the values of several attributes. A transition represents a change of state triggered by events, conditions, or time. For example, Figure uml.06 depicts three transitions: from the Active state into the Inactive state, from the Inactive state to the Closed state, and from the Closed state to the Archived state.
A state is depicted by a rounded rectangle. A transition is depicted by an open arrow connecting two states. States are labeled with their name. A small solid black circle indicates the initial state. A circle surrounding a small solid black circle indicates a final state.




www.CodeNirvana.in

Copyright © Computer Science | Blogger Templates | Designed By Code Nirvana