0% found this document useful (0 votes)
36 views5 pages

StateMachine Edited

A state diagram in UML represents the condition of a system or class at different points in time using states and transitions between states caused by events. It uses graphical elements like circles, rectangles and arrows to depict initial states, transitions between states, concurrent states, and final states. A state diagram is used to model the dynamic behavior of a class in response to external stimuli over time.

Uploaded by

Nani Tharun
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views5 pages

StateMachine Edited

A state diagram in UML represents the condition of a system or class at different points in time using states and transitions between states caused by events. It uses graphical elements like circles, rectangles and arrows to depict initial states, transitions between states, concurrent states, and final states. A state diagram is used to model the dynamic behavior of a class in response to external stimuli over time.

Uploaded by

Nani Tharun
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

What is a state diagram in UML?

 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. Basic components and notations of a State Machine


diagram
2.1. Initial state
We use a black filled circle represent the initial state of a System or a Class.

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.

2.6. Self transition


We use a solid arrow pointing back to the state itself to represent a self transition. There
might be scenarios when the state of the object does not change upon the occurrence of
an event. We use self transitions to represent such cases.
2.7. Composite state
We use a rounded rectangle to represent a composite state also. We represent a state
with internal activities using a composite state.

2.8. Final State


We use a filled circle within a circle notation to represent the final state in a state
machine diagram.
Airport check-in state diagram example

The following example simplifies the steps required to check in at an


airport. For airlines, a state diagram can help to streamline
processes and eliminate unnecessary steps.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy