Runtime process for a single onboarding flow.
The worker restores persisted flow state, applies state-machine transitions, and persists changes when the flow advances.
Summary
Functions
Returns a specification to start this module under a supervisor.
Returns the current onboarding flow state from a worker.
Starts an onboarding worker registered by onboarding ID.
Applies an onboarding transition and persists the updated flow.
Returns the worker process for onboarding_id, if it is running.
Types
@type state() :: %{ instance_module: module(), onboarding_id: String.t(), flow: Jido.Messaging.Onboarding.Flow.t() }
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec get_flow(pid(), timeout()) :: {:ok, Jido.Messaging.Onboarding.Flow.t()} | {:error, term()}
Returns the current onboarding flow state from a worker.
@spec start_link(keyword()) :: GenServer.on_start()
Starts an onboarding worker registered by onboarding ID.
@spec transition( pid(), Jido.Messaging.Onboarding.StateMachine.transition(), map(), keyword(), timeout() ) :: {:ok, %{ flow: Jido.Messaging.Onboarding.Flow.t(), transition: Jido.Messaging.Onboarding.StateMachine.transition_result() }} | {:error, term()}
Applies an onboarding transition and persists the updated flow.
Returns the worker process for onboarding_id, if it is running.