Type alias OrchestrationStateConfigV3<TContext>

OrchestrationStateConfigV3<TContext>: {
    always?: Transition<TContext>;
    description?: string;
    emit?: Emit<TContext, string, zod.ZodObject<any>>;
    entry?: Action<TContext>[];
    exit?: Action<TContext>[];
    initial?: string;
    on?: Transition<TContext>[];
    onDone?: {
        target: string;
    };
    states?: Record<string, OrchestrationStateConfigV3<TContext>>;
    type?: OrchestrationStateType;
}

Configures individual states within an orchestration machine, including details on state types, transitions, actions, and nested states.

Attributes:

  • type: Specifies the state's operational mode—'parallel', 'final', or standard. Defines whether the state can run concurrently with others or is an endpoint.
  • description: An optional detailed explanation of the state's purpose or behavior.
  • initial: Identifier for the initial state within nested configurations, required for non-parallel types.
  • emit: Configurations for emitting events upon state entry, facilitating reactive programming.
  • entry: Actions to execute upon entering the state, which can modify the context or trigger side effects.
  • exit: Actions to execute upon exiting the state, important for cleanup or final state adjustments.
  • on: Event-driven transitions detailing responses to events within this state.
  • onDone: Target state after completing all sub-states in a 'parallel' configuration.
  • states: Definitions of nested states, supporting hierarchical state structures.
  • always: An unconditional transition that triggers when the state is reached, ensuring smooth progressions.

Type Parameters

  • TContext extends Record<string, any>

Type declaration

Typeparam

TContext The context type of the state machine, defining the shape of data available during state transitions.

Generated using TypeDoc