Executes one visible attempt from the journal-backed runtime queue.
The runtime step boundary is the side-effect boundary for the journal-backed runtime. It claims a visible attempt with the dispatch agent, runs the declared workflow step once, records either a completed or failed attempt fact, and then applies any completed dispatch results back to the workflow journal.
Summary
Functions
Executes the next visible journal attempt, if one exists.
Types
@type execute_error() :: {:invalid_option, {:opts, term()} | {:runtime, term()} | {:journal_storage, nil} | {:queue, term()} | {:now, term()} | {:finished_at, term()} | {:owner_id, term()} | {:claim_id, term()} | {:claim_token, term()} | {:heartbeat_interval_ms, term()} | {:test_after_claim, term()} | {:test_before_completion, term()} | {:test_after_transaction_step, term()} | {:option, atom()}} | Squidie.Workflow.Definition.load_error() | {:unknown_step, atom()} | term()
@type execute_result() :: {:ok, Squidie.ReadModel.Inspection.Snapshot.t()} | {:ok, :none} | {:error, execute_error()}
Functions
@spec execute_next(keyword()) :: execute_result()
Executes the next visible journal attempt, if one exists.
Options:
:runtimemust be:journal.:journal_storageis the Jido storage adapter config.:queueselects the dispatch queue and defaults to"default".:owner_ididentifies the worker claiming the attempt.:claim_idand:claim_tokenmay be supplied by tests or host lease backends that need deterministic fencing values.:heartbeat_interval_msrenews the claim lease while the executor owns a running attempt. The executor keeps claim tokens internal.:nowcontrols visibility, lease, and event timestamps.:finished_atcontrols completion/failure timestamps for deterministic tests. Runtime callers normally omit it so the timestamp is captured after action execution.