State transition
A state transition is a change from one defined state of a system, object, or process to another according to an action, event, condition, or rule.
Object-Oriented Software Design in C++
A state transition is a change from one object state to another caused by a change in member-variable values.
- How it is used
- Uses state transitions to visualize runtime behavior and organize actions that depend on an object’s current state.
- How deep it goes
- Explains member-variable changes, UML notation, guarded paths, terminal states, and polymorphic next-state handling.
- Examples
- Uses Car behavior, student enrollment, and a ticket machine with card validation, ticket counts, and a SOLD_OUT state.
- What you can do after
- Evaluate/understand runtime state changes and design a state-based class using UML diagrams or separate State subclasses.
Read how Object-Oriented Software Design in C++ explains state transition →
Functional Programming in C#, Second Edition
A state transition is a change from an entity's current state to a resulting state.
- How it is used
- Models how an entity changes while retaining its identity, using transitions instead of mutating state snapshots.
- How deep it goes
- Works through transition functions, account creation, event matching, and an exception fallback for unhandled events.
- Examples
- Uses account creation, cash deposits, transfers, and account freezing to illustrate different transitions.
- What you can do after
- Build it from scratch by implementing functions that create account state and apply events to produce updated snapshots.
Read how Functional Programming in C#, Second Edition explains state transition →
Type-Driven Development with Idris
A state transition is a change from one state of a system to another as a result of an operation.
- How it is used
- Uses state transitions to express valid operation sequences in state-machine command types.
- How deep it goes
- Works through indexed command types and precondition checks, while leaving execution of the door and vending-machine models unimplemented.
- Examples
- Uses a door and a vending machine, including coin insertion, vending, and returning coins.
- What you can do after
- Build state-machine command models from scratch in Idris and check that operation sequences satisfy their modeled preconditions.
Read how Type-Driven Development with Idris explains state transition →
Applied Reinforcement Learning
A state transition is a change from one environment state to another resulting from an action and possibly random effects.
- How it is used
- Models how a system moves between states during sequential decisions under uncertainty.
- How deep it goes
- Distinguishes deterministic evolution from stochastic transitions with known probabilities and applies transitions in business examples.
- Examples
- Uses customer plan changes, online-store pricing, and call-center staffing to illustrate system evolution.
- What you can do after
- Evaluate how business actions affect next states and identify missing information that weakens prediction.
Read how Applied Reinforcement Learning explains state transition →
Software Design for Python Programmers
A state transition is a change from one object state to another caused by changes in one or more attributes.
- How it is used
- Models runtime behavior whose allowed actions and responses depend on an object's current state.
- How deep it goes
- Defines transitions and traces multiple conditional paths, while deferring implementation details of the State Design Pattern.
- Examples
- Uses an automatic ticket machine with card insertion, validation, ticket collection, card removal, rejection, and sold-out paths.
- What you can do after
- Evaluate object behavior by identifying states, attribute changes, triggering actions, conditions, and reachable transitions.
Read how Software Design for Python Programmers explains state transition →
React in Depth
A state transition is a state machine operation that changes the machine from one state to another in response to an event or condition.
- How it is used
- Models constrained application flow while coordinating data updates triggered by events.
- How deep it goes
- Defines legal events, targets, actions, context, selectors, and hooks, but does not develop formal state-machine theory.
- Examples
- Uses signup navigation and a list/detail application with add, view, complete, undo, remove, and persistence operations.
- What you can do after
- Apply it via XState by defining legal transitions, attaching context actions, and exposing machine state through React hooks.
Functional Programming in Scala, Second Edition
A state action is a function that consumes an RNG state and returns a generated value together with a successor RNG state.
- How it is used
- Represents random computation as composable functions that thread RNG state without explicit repetitive passing.
- How deep it goes
- Defines the function representation and develops map, map2, sequence, flatMap, and imperative-style composition.
- Examples
- Uses nonNegativeEven, paired integer-double actions, list sequencing, and a candy-machine simulation.
- What you can do after
- Build state actions from scratch and combine them with map, map2, sequence, flatMap, and for-comprehensions.
Read how Functional Programming in Scala, Second Edition explains state transition →
The Art of Unit Testing 3e
A state change is a modification to data or module state that can be observed by code outside the operation causing it.
- How it is used
- Treats an externally observable state change as an exit point for defining and testing a unit of work.
- How deep it goes
- Defines state change as a publicly noticeable exit point and demonstrates checking a UI change, without detailing state-management internals.
- Examples
- Demonstrates a JavaScript button click changing a result element’s text, then checks the element’s visible content.
- What you can do after
- Evaluate unit behavior by checking an observable state change rather than private implementation logic.
Read how The Art of Unit Testing 3e explains state transition →
Natural Language Processing in Action, Second Edition
A state transition is a change from one conversational state to another in response to an input or condition.
- How it is used
- Routes chatbot inputs through conversation graphs to select the next conversational state.
- How deep it goes
- Explains intents as graph edges and demonstrates YAML trigger routing, without detailing the underlying decision algorithm.
- Examples
- Uses an elementary counting tutor with correct-answer and wrong-answer routes for alternative user responses.
- What you can do after
- Build a conversation graph that maps anticipated user replies to target chatbot states.
Read how Natural Language Processing in Action, Second Edition explains state transition →
API Design Patterns
A state transition is a change of a resource from one status or condition to another.
- How it is used
- Guides API designers in deciding when a resource state change deserves a custom action instead of a standard update.
- How deep it goes
- Explains the conceptual distinction from scalar updates and identifies confusion and side effects, but stops short of implementing a custom action.
- Examples
- Uses an email moving from draft to sent, with UpdateEmail setting state to sent as the problematic design.
- What you can do after
- Apply custom actions to represent meaningful state changes rather than disguising them as ordinary field updates.
Healthcare IT
A state transition is a change of an object or process from one defined state to another according to permitted transition rules.
- How it is used
- Models clinical orders and workflows as controlled progressions that coordinate responsibilities, data capture, and downstream actions.
- How deep it goes
- Traces permitted order states, actors, timestamps, data, and interacting workflow effects, but does not specify implementation code.
- Examples
- Uses a CBC order moving through signing, activation, specimen collection, processing, and result finalization.
- What you can do after
- Build clinical workflow logic that rejects invalid steps, records timestamped responsibility, and reacts to related events.
Build and Orchestrator in Go (From Scratch)
A state transition is a change of a task from one lifecycle state to another in response to an event.
- How it is used
- Constrains task lifecycle changes during orchestration by allowing only event-driven transitions defined for each current state.
- How deep it goes
- Defines states, tabulates valid moves, and implements map-based validation while deferring a full state-machine abstraction.
- Examples
- Uses Pending, Scheduled, Running, Completed, and Failed states with ScheduleEvent, StartTask, and StopTask transitions.
- What you can do after
- Build it from scratch with a state map and helper that reject destinations not listed for the current state.
Read how Build and Orchestrator in Go (From Scratch) explains state transition →
Also covered in
- Advanced Algorithms and Data Structures
- AI GovernanceIn early access (MEAP)
- Data-Oriented Programming in JavaIn early access (MEAP)
- Amazon Web Services in Action, Third Edition: An in-depth guide to AWS
- Java Persistence with Spring Data and Hibernate epub
- Optimization Algorithms: AI techniques for design, planning, and control problems
- F# in Action: A Revised Edition of Get Programming with F#
- Think Distributed Systems
- Idiomatic Rust
- Regular Expression Puzzles and AI Coding Assistants
- Digital Twins in Action
- Build a DeepSeek Model (From Scratch)In early access (MEAP)
What to know first
- stateState is information describing the condition or configuration of a system or computation at a particular time that may influence its behavior or subsequent transitions.
- pattern matchingPattern matching is the process of comparing values or input with specified patterns to identify matches, classify data, or select corresponding behavior.
- data modelA data model is a structured representation that defines how data is organized, including its entities, attributes, relationships, and applicable constraints.
- data explorationData exploration is the systematic examination and summarization of data to understand its structure, distributions, relationships, patterns, anomalies, and quality.
Related concepts
- stateful computationincludes · A stateful computation takes a state and potentially other arguments, then returns a new state and potentially a result.
- finite-state machinepart of · A finite-state machine is a computational model with a finite set of states and defined transitions between them, typically determined by inputs or events.
- eventproduced by · A software event is an occurrence, state change, or notification that a system can detect, record, communicate, or handle.
- stateproduces · State is information describing the condition or configuration of a system or computation at a particular time that may influence its behavior or subsequent transitions.
- state design patternused by · The State design pattern encapsulates state-specific behavior in separate representations and delegates an object's behavior according to its current state.
- AI agentproduced by · An AI agent is a computational system that uses artificial intelligence to interpret information and select or perform actions toward goals while interacting with an environment.
Questions about state transition
What is state transition?
A state transition is a change from one defined state of a system, object, or process to another according to an action, event, condition, or rule.
Which Manning books explain state transition?
Object-Oriented Software Design in C++, Functional Programming in C#, Second Edition, Type-Driven Development with Idris, Applied Reinforcement Learning, Software Design for Python Programmers, React in Depth, Functional Programming in Scala, Second Edition, The Art of Unit Testing 3e and 4 more.
What should I know before learning state transition?
Manning books that teach state transition usually introduce state, pattern matching, data model and data exploration first.
What kinds of state transition are there?
Kinds of state transition include stateful computation.
What is state transition part of?
State transition is part of finite-state machine. A finite-state machine is a computational model with a finite set of states and defined transitions between them, typically determined by inputs or events.
What is state transition also called?
State transition is also called state changes.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.











