3
Most read
4
Most read
12
Most read
UML 2 State Machine Diagrams
State Machine Diagrams
• UML state machine diagrams depict the various states that an
object may be in and the transitions between those states.
• In other modeling languages, it is common for this type of a
diagram to be called a state-transition diagram or even simply a
state diagram.
State Machine Diagrams
• States - A state is denoted by a round-cornered rectangle
with the name of the state written inside it.
• Initial and Final States - The initial state is denoted by a filled
black circle and may be labeled with a name. The final state is
denoted by a circle with a dot inside and may also be labeled
with a name.
State Machine Diagrams
• Transitions - Transitions is a progression from one state to another are
denoted by lines with arrowheads. A transition may have a trigger, a
guard and an effect.
• Self-Transitions - A state can have a transition that returns to itself, as in
the following diagram. This is most useful when an effect is associated
with the transition.
• "Trigger" is the cause of the transition, which could be a signal, an event,
a change in some condition, or the passage of time. "Guard" is a condition
which must be true in order for the trigger to cause the transition. "Effect"
is an action which will be invoked directly on the object that owns the
state machine as a result of the transition.
State Machine Diagram
State Machine Diagram
Super state
• A super-state is used when many transitions
lead to the a certain state. Instead of showing
all of the transitions from each state to the
redundant state a super-state can be used to
show that all of the states inside of the super-
state can transition to the redundant state.
• This helps make the state diagram easier to
read.
Super state
State Machine Diagrams
• Compound States - A state machine diagram may include sub-machine
diagrams, as in the example below.
Alternative way to
show the same
information
•The ∞ symbol indicates that details of the Check PIN
sub-machine are shown in a separate diagram.
State Machine Diagrams
• Choice Pseudo-State - A choice pseudo-state is shown as a diamond with
one transition arriving and two or more transitions leaving. The following
diagram shows that whichever state is arrived at, after the choice pseudo-
state, is dependent on the message format selected during execution of
the previous state.
State Machine Diagrams
• Junction Pseudo-State - Junction pseudo-states are used to chain together
multiple transitions. A single junction can have one or more incoming, and one
or more outgoing, transitions; a guard can be applied to each transition.
Junctions are semantic-free. A junction which splits an incoming transition into
multiple outgoing transitions realizes a static conditional branch, as opposed
to a choice pseudo-state which realizes a dynamic conditional branch.
State Machine Diagrams
• Concurrent Regions - A state may be divided into regions containing sub-
states that exist and execute concurrently. The example below shows that
within the state "Applying Brakes", the front and rear brakes will be
operating simultaneously and independently. Notice the use of fork and
join pseudo-states, rather than choice and merge pseudo-states. These
symbols are used to synchronize the concurrent threads.

More Related Content

PPT
5.state diagrams
 
PPTX
Diagrams
PPT
Class diagrams
PPT
State Diagrams
PPT
Uml Activity Diagram
PPTX
Sequence diagram
PPT
11 deployment diagrams
PDF
Domain Modeling
5.state diagrams
 
Diagrams
Class diagrams
State Diagrams
Uml Activity Diagram
Sequence diagram
11 deployment diagrams
Domain Modeling

What's hot (20)

PPTX
Modules and modularization criteria
PPTX
Component and Deployment Diagram - Brief Overview
PDF
Sequence diagram- UML diagram
PDF
Collaboration diagram- UML diagram
PDF
State chart diagram
PPTX
Fundamental design concepts
PPTX
Object Modeling Techniques
PPTX
Class Diagram
PPTX
Types and roles
PPT
Uml class-diagram
PPTX
Ooad unit – 1 introduction
PPT
UML Architecture and Views
PPTX
All data models in dbms
PPTX
Cohesion and coupling
PPT
Uml diagrams
PPT
Unit 2(advanced class modeling & state diagram)
PDF
Sequence Diagram
PPTX
Chapter 1 2 - some size factors
PPTX
PPTX
state modeling In UML
Modules and modularization criteria
Component and Deployment Diagram - Brief Overview
Sequence diagram- UML diagram
Collaboration diagram- UML diagram
State chart diagram
Fundamental design concepts
Object Modeling Techniques
Class Diagram
Types and roles
Uml class-diagram
Ooad unit – 1 introduction
UML Architecture and Views
All data models in dbms
Cohesion and coupling
Uml diagrams
Unit 2(advanced class modeling & state diagram)
Sequence Diagram
Chapter 1 2 - some size factors
state modeling In UML
Ad

Similar to State Machine Diagram (20)

PPTX
State-Machine-Diagram.pptx
PPT
Seminar State Chart1
PPT
StateDiagrams (Unified modeling Languages)
PDF
Free ebooks download ! Edhole
PDF
Free ebooks download ! Edhole
PPTX
Mgd finite statemachine
DOCX
States machine
PPTX
Unit 4- State Machine in mobile programming
PPT
Logic and computer design.ppt
PDF
CS8592-OOAD Lecture Notes Unit-3
PPS
09 ooad uml-11
PPTX
Software engineering.pptx
PPTX
PPT
States and Activities
PPTX
Finite State Machine.ppt.pptx
PPTX
States, state graphs and transition testing
PPTX
483-Final-Harel_ Statechart & UML.pptx
PPTX
Unit III Dynamic and Implementation UML Diagrams.pptx
PPT
08 state diagram and activity diagram
DOCX
UNIT-IV .FINITE STATE MACHINES
State-Machine-Diagram.pptx
Seminar State Chart1
StateDiagrams (Unified modeling Languages)
Free ebooks download ! Edhole
Free ebooks download ! Edhole
Mgd finite statemachine
States machine
Unit 4- State Machine in mobile programming
Logic and computer design.ppt
CS8592-OOAD Lecture Notes Unit-3
09 ooad uml-11
Software engineering.pptx
States and Activities
Finite State Machine.ppt.pptx
States, state graphs and transition testing
483-Final-Harel_ Statechart & UML.pptx
Unit III Dynamic and Implementation UML Diagrams.pptx
08 state diagram and activity diagram
UNIT-IV .FINITE STATE MACHINES
Ad

Recently uploaded (20)

PPTX
A powerpoint presentation on the Revised K-10 Science Shaping Paper
PDF
Vision Prelims GS PYQ Analysis 2011-2022 www.upscpdf.com.pdf
PPTX
Core Concepts of Personalized Learning and Virtual Learning Environments
PDF
Hazard Identification & Risk Assessment .pdf
PDF
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 2).pdf
PDF
English Textual Question & Ans (12th Class).pdf
PDF
My India Quiz Book_20210205121199924.pdf
PDF
LEARNERS WITH ADDITIONAL NEEDS ProfEd Topic
PDF
Complications of Minimal Access-Surgery.pdf
PDF
advance database management system book.pdf
PDF
LIFE & LIVING TRILOGY - PART - (2) THE PURPOSE OF LIFE.pdf
PDF
LIFE & LIVING TRILOGY- PART (1) WHO ARE WE.pdf
PDF
MBA _Common_ 2nd year Syllabus _2021-22_.pdf
PDF
semiconductor packaging in vlsi design fab
PDF
1.3 FINAL REVISED K-10 PE and Health CG 2023 Grades 4-10 (1).pdf
PDF
FOISHS ANNUAL IMPLEMENTATION PLAN 2025.pdf
PDF
David L Page_DCI Research Study Journey_how Methodology can inform one's prac...
PPTX
Education and Perspectives of Education.pptx
PDF
BP 505 T. PHARMACEUTICAL JURISPRUDENCE (UNIT 2).pdf
PPTX
What’s under the hood: Parsing standardized learning content for AI
A powerpoint presentation on the Revised K-10 Science Shaping Paper
Vision Prelims GS PYQ Analysis 2011-2022 www.upscpdf.com.pdf
Core Concepts of Personalized Learning and Virtual Learning Environments
Hazard Identification & Risk Assessment .pdf
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 2).pdf
English Textual Question & Ans (12th Class).pdf
My India Quiz Book_20210205121199924.pdf
LEARNERS WITH ADDITIONAL NEEDS ProfEd Topic
Complications of Minimal Access-Surgery.pdf
advance database management system book.pdf
LIFE & LIVING TRILOGY - PART - (2) THE PURPOSE OF LIFE.pdf
LIFE & LIVING TRILOGY- PART (1) WHO ARE WE.pdf
MBA _Common_ 2nd year Syllabus _2021-22_.pdf
semiconductor packaging in vlsi design fab
1.3 FINAL REVISED K-10 PE and Health CG 2023 Grades 4-10 (1).pdf
FOISHS ANNUAL IMPLEMENTATION PLAN 2025.pdf
David L Page_DCI Research Study Journey_how Methodology can inform one's prac...
Education and Perspectives of Education.pptx
BP 505 T. PHARMACEUTICAL JURISPRUDENCE (UNIT 2).pdf
What’s under the hood: Parsing standardized learning content for AI

State Machine Diagram

  • 1. UML 2 State Machine Diagrams
  • 2. State Machine Diagrams • UML state machine diagrams depict the various states that an object may be in and the transitions between those states. • In other modeling languages, it is common for this type of a diagram to be called a state-transition diagram or even simply a state diagram.
  • 3. State Machine Diagrams • States - A state is denoted by a round-cornered rectangle with the name of the state written inside it. • Initial and Final States - The initial state is denoted by a filled black circle and may be labeled with a name. The final state is denoted by a circle with a dot inside and may also be labeled with a name.
  • 4. State Machine Diagrams • Transitions - Transitions is a progression from one state to another are denoted by lines with arrowheads. A transition may have a trigger, a guard and an effect. • Self-Transitions - A state can have a transition that returns to itself, as in the following diagram. This is most useful when an effect is associated with the transition. • "Trigger" is the cause of the transition, which could be a signal, an event, a change in some condition, or the passage of time. "Guard" is a condition which must be true in order for the trigger to cause the transition. "Effect" is an action which will be invoked directly on the object that owns the state machine as a result of the transition.
  • 7. Super state • A super-state is used when many transitions lead to the a certain state. Instead of showing all of the transitions from each state to the redundant state a super-state can be used to show that all of the states inside of the super- state can transition to the redundant state. • This helps make the state diagram easier to read.
  • 9. State Machine Diagrams • Compound States - A state machine diagram may include sub-machine diagrams, as in the example below. Alternative way to show the same information •The ∞ symbol indicates that details of the Check PIN sub-machine are shown in a separate diagram.
  • 10. State Machine Diagrams • Choice Pseudo-State - A choice pseudo-state is shown as a diamond with one transition arriving and two or more transitions leaving. The following diagram shows that whichever state is arrived at, after the choice pseudo- state, is dependent on the message format selected during execution of the previous state.
  • 11. State Machine Diagrams • Junction Pseudo-State - Junction pseudo-states are used to chain together multiple transitions. A single junction can have one or more incoming, and one or more outgoing, transitions; a guard can be applied to each transition. Junctions are semantic-free. A junction which splits an incoming transition into multiple outgoing transitions realizes a static conditional branch, as opposed to a choice pseudo-state which realizes a dynamic conditional branch.
  • 12. State Machine Diagrams • Concurrent Regions - A state may be divided into regions containing sub- states that exist and execute concurrently. The example below shows that within the state "Applying Brakes", the front and rear brakes will be operating simultaneously and independently. Notice the use of fork and join pseudo-states, rather than choice and merge pseudo-states. These symbols are used to synchronize the concurrent threads.

Editor's Notes

  • #3: The door can be in one of three states: "Opened", "Closed" or "Locked". It can respond to the events Open, Close, Lock and Unlock. Notice that not all events are valid in all states; for example, if a door is opened, you cannot lock it until you close it. Also notice that a state transition can have a guard condition attached: if the door is Opened, it can only respond to the Close event if the condition doorWay->isEmpty is fulfilled. The syntax and conventions used in state machine diagrams will be discussed in full in the following sections.
  • #7: an example of a state diagram might look like for an Order object.  When the object enters the Checking state it performs the activity "check items."  After the activity is completed the object transitions to the next state based on the conditions [all items available] or [an item is not available].  If an item is not available the order is canceled.  If all items are available then the order is dispatched.  When the object transitions to the Dispatching state the activity "initiate delivery" is performed.  After this activity is complete the object transitions again to the Delivered state.