Skip to main content

Module task_outcome

Module task_outcome 

Source
Expand description

§Task outcome

Type returned by every task execution. Replaces the historical (usize, Vec<Change>) tuple — the bare usize doubled as both an HTTP-like status (200) and an in-band control-flow signal (skip / halt) which made the contract impossible to type-check. TaskOutcome makes the four cases explicit; the audit-trail status code is derived from the variant.

The Vec<Change> is no longer part of the return value — sync built-ins emit changes via the executor’s per-task buffer, async handlers via TaskContext. The audit trail is recorded by the workflow executor based on the variant returned here.

Enums§

TaskOutcome
Outcome of a single task execution.

Constants§

HALT_STATUS_CODE
Status code recorded on the audit trail when a task halts the workflow.