Skip to content

State Machine Pseudostates

Mikołaj Milewski edited this page Oct 27, 2026 · 1 revision

Pseudostates

Pseudostate, unlike State, does not represent stable configuration of State Machine. Pseudostates are used to control the flow of Transitions connecting States.

In general, Pseudostate consist of:

Types of Pseudostates

Stateflows supports five types of Pseudostates:

  1. Choice that allows to build dynamic Transitions chains, where Transitions are traversed sequentialy and their Guards are evaluated after previous Transition Effect is invoked,
  2. Junction that allows to build static Transitions chains, where all Transition Guards are evaluated (and must return true) before any Transition Effect is invoked,
  3. Fork that allows to enter multiple States (located in different Regions of Orthogonal State) at once,
  4. Join that allows to leave multiple States (located in different Regions of Orthogonal State) at once,
  5. History that restores the most recently active state configuration of its containing region when a transition targets it.

History is declared inside a composite state or an orthogonal state's region with AddHistory(). It is an entry point rather than a stable State. See History Pseudostate for restoration behavior and default entry paths. Event deferral is a separate State feature, declared with AddDeferredEvent<TEvent>(); it is covered in In-State Event Deferrals.

Overview
Installation
Runtimes
   Orleans runtime
Concepts
   Events and Structural Events
   Messaging Patterns
   Validation
   Scheduling
   Observability
Behaviors
   Behavior Values
   Dependency Injection
   Behavioral Groups
   State Machines
       Concepts
           State Identity
           In-State Event Deferrals
           Evaluation of Transitions
           Exception Handling
       Building blocks
           Regions
           States
               State
               Composite State
               Orthogonal State
               Final State
           Pseudostates
               Choice
               Junction
               Fork
               Join
               History
           Transitions
               Transition
               Default Transition
               Internal Transition
   Activities
       Concepts
           Exception Handling
           Implicit Fork and Join
           Tokens
       Building blocks
           Nodes
               Action Node
               Decision Node
               Merge Node
               Initial Node
               Final Node
               Input Node
               Output Node
               Fork Node
               Join Node
               Accept Event Action Node
               Send Event Action Node
               Publish Event Action Node
               Time Event Action Node
               Data Store Node
               Structured Activity Node
               Iterative Activity Node
               Parallel Activity Node
           Flows
               Data Flow
               Control Flow
   Actions
   Entities
       Fields
       Mutations
       Projections
Extensions
   ClearScript
   FluentValidation
   JSON definitions
   Minimal APIs
   OneOf
   OpenTelemetry
   PlantUML
   Scheduling

Clone this wiki locally