StateMachine Edited
StateMachine Edited
A state diagram is used to represent the condition of the system or part of the
system at finite instances of time.
It’s a behavioral diagram and it represents the behavior using finite state
transitions.
State Machine diagrams are also referred to as State Machines Diagrams and
State-Chart Diagrams.
These terms are often used interchangeably. So simply, a state machine diagram
is used to model the dynamic behavior of a class in response to time and
changing external stimuli.
We can say that each and every class has a state but we don’t model every class
using State Machine diagrams.
We prefer to model the states with three or more states.
2.2. Transition
We use a solid arrow to represent the transition or change of control from one state to
another. The arrow is labelled with the event which causes the change in state.
2.3. State
We use a rounded rectangle to represent a state. A state represents the conditions or
circumstances of an object of a class at an instant of time.
2.4. Fork
We use a rounded solid rectangular bar to represent a Fork notation with incoming
arrow from the parent state and outgoing arrows towards the newly created states. We
use the fork notation to represent a state splitting into two or more concurrent states.
2.5. Join
We use a rounded solid rectangular bar to represent a Join notation with incoming
arrows from the joining states and outgoing arrow towards the common goal state. We
use the join notation when two or more states concurrently converge into one on the
occurrence of an event or events.