#[non_exhaustive]pub enum RuntimeCommand {
Show 14 variants
Complete {
output: JsonValue,
},
Fail {
error: String,
},
Cancel,
Timeout {
deadline: DateTime<Utc>,
reason: Option<String>,
},
ContinueAsNew {
input: JsonValue,
},
RecordProgress {
progress: WorkflowProgress,
},
LinkChildOperation {
child: ChildOperationReference,
},
StartChildWorkflow {
child_id: String,
spec: WorkflowSpec,
input: JsonValue,
cancellation_policy: ChildWorkflowCancellationPolicy,
},
ScheduleStep {
step_id: String,
step_name: String,
input: JsonValue,
retry: RetryPolicy,
},
ScheduleSteps {
steps: Vec<StepCommand>,
},
WaitUntil {
wait_id: String,
resume_at: DateTime<Utc>,
},
CreateHook {
hook_id: String,
token: String,
metadata: JsonValue,
},
WaitForSignal {
wait_id: String,
signal_name: String,
},
StartChildWorkflows {
children: Vec<ChildWorkflowCommand>,
},
}Expand description
Command emitted by the workflow runtime after replay.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Complete
Completes the workflow run successfully.
Fail
Fails the workflow run with an application error.
Cancel
Finish a previously requested cleanup-aware cancellation.
Timeout
Finish a run with a typed timeout outcome.
Fields
ContinueAsNew
Close this history segment and start a successor with the same spec.
RecordProgress
Persist progress before replaying the workflow.
Fields
progress: WorkflowProgressProgress value exposed through inspection and observation APIs.
LinkChildOperation
Persist a parent-to-child operation reference before replaying.
Fields
child: ChildOperationReferenceStable reference to the externally managed child operation.
StartChildWorkflow
Start or await a first-class child workflow with a stable parent-local id.
Fields
spec: WorkflowSpecWorkflow definition used to create the child.
cancellation_policy: ChildWorkflowCancellationPolicyPolicy applied when the parent is cancelled or terminated.
ScheduleStep
Schedules one durable step or awaits its recorded outcome.
Fields
retry: RetryPolicyRetry behavior pinned when the step is created.
ScheduleSteps
Atomically schedules a batch of durable steps.
Fields
steps: Vec<StepCommand>Step definitions in deterministic scheduling order.
WaitUntil
Suspends replay until a UTC deadline becomes ready.
Fields
CreateHook
Creates an externally completable hook.
Fields
WaitForSignal
Suspend until the next unconsumed signal with signal_name is paired
with this stable wait identity.
Fields
StartChildWorkflows
Request a bounded batch before any first-class child starts.
Fields
children: Vec<ChildWorkflowCommand>Child definitions in deterministic request order.
Implementations§
Source§impl RuntimeCommand
impl RuntimeCommand
Sourcepub fn schedule_step(
step_id: impl Into<String>,
step_name: impl Into<String>,
input: JsonValue,
) -> Self
pub fn schedule_step( step_id: impl Into<String>, step_name: impl Into<String>, input: JsonValue, ) -> Self
Creates a single-step schedule command with the default retry policy.
Sourcepub fn schedule_steps(steps: Vec<StepCommand>) -> Self
pub fn schedule_steps(steps: Vec<StepCommand>) -> Self
Creates an atomic batch scheduling command.
Sourcepub fn start_child_workflows(children: Vec<ChildWorkflowCommand>) -> Self
pub fn start_child_workflows(children: Vec<ChildWorkflowCommand>) -> Self
Create a bounded batch child-workflow command.
Trait Implementations§
Source§impl Clone for RuntimeCommand
impl Clone for RuntimeCommand
Source§fn clone(&self) -> RuntimeCommand
fn clone(&self) -> RuntimeCommand
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more