pub struct StepExecutionContext<'a> {Show 13 fields
pub item: Option<&'a Value>,
pub execution_pointer: &'a ExecutionPointer,
pub persistence_data: Option<&'a Value>,
pub step: &'a WorkflowStep,
pub workflow: &'a WorkflowInstance,
pub definition: Option<&'a WorkflowDefinition>,
pub cancellation_token: CancellationToken,
pub host_context: Option<&'a dyn HostContext>,
pub log_sink: Option<&'a dyn LogSink>,
pub artifact_store: Option<&'a dyn ArtifactStore>,
pub artifact_volume: Option<&'a ArtifactVolume>,
pub artifact_package: Option<ArtifactVolumePackage>,
pub persistence: Option<&'a dyn PersistenceProvider>,
}Expand description
Context available to a step during execution.
Fields§
§item: Option<&'a Value>The current item when iterating (ForEach).
execution_pointer: &'a ExecutionPointerThe current execution pointer.
persistence_data: Option<&'a Value>Persistence data from a previous execution of this step.
step: &'a WorkflowStepThe step definition.
workflow: &'a WorkflowInstanceThe running workflow instance.
definition: Option<&'a WorkflowDefinition>The compiled workflow definition the instance was created from.
None on code paths that don’t have it available (some test fixtures);
production execution always populates this so executor-specific
features (e.g. Kubernetes shared volumes) can inspect the
definition-level configuration.
cancellation_token: CancellationTokenCancellation token.
host_context: Option<&'a dyn HostContext>Host context for starting child workflows. None if not available.
log_sink: Option<&'a dyn LogSink>Log sink for streaming step output. None if not configured.
artifact_store: Option<&'a dyn ArtifactStore>Artifact store for backward compatibility.
artifact_volume: Option<&'a ArtifactVolume>Resolved artifact volume for this step. Preferred over artifact_store.
artifact_package: Option<ArtifactVolumePackage>Serialized artifact package for distributed scenarios.
persistence: Option<&'a dyn PersistenceProvider>Persistence provider. Available to long-running steps (e.g.
SignAndWriteCommitStep) that need to emit a mid-step heartbeat by
calling persistence.persist_workflow(&instance). The Postgres
implementation automatically bumps last_heartbeat_at = now() on
every persist_workflow call.