pub struct WorkflowHistory { /* private fields */ }Expand description
Recorded workflow input and history, independent of a live Server.
Implementations§
Source§impl WorkflowHistory
impl WorkflowHistory
Sourcepub fn from_export(export: Value) -> Result<Self>
pub fn from_export(export: Value) -> Result<Self>
Import a dw workflow:history-export or SDK export bundle.
Payloads must be present and resolved; redacted/pruned input is refused.
Sourcepub fn from_history<T: Serialize>(
workflow_type: &str,
input: T,
history: Value,
) -> Result<Self>
pub fn from_history<T: Serialize>( workflow_type: &str, input: T, history: Value, ) -> Result<Self>
Import all pages of the Server history API, supplying original input. Also accepts an array of events. A remaining page token is refused.
Sourcepub fn task_queue(self, queue: impl Into<String>) -> Self
pub fn task_queue(self, queue: impl Into<String>) -> Self
Override task-queue context omitted by a raw history response.
Sourcepub fn replay_clock(self, carrier: Value) -> Result<Self>
pub fn replay_clock(self, carrier: Value) -> Result<Self>
Supply the run’s replay_clock entry carrier (WorkerReplayClock v1)
that Server sent on its workflow tasks, so a replayed body that reads
crate::WorkflowContext::replay_now at entry sees the same instant.
The carrier is validated now against this history’s run ID: an
invalid carrier, or one for another run, is refused. Without one,
entry stays unavailable. Self::export does not include it, and
crate::testing::WorkflowEnvironment::run_workflow supplies none.