defineApprovalTask
Purpose and behavior
Section titled “Purpose and behavior”Define a gate task that pauses the run once its dependencies are done and waits for approve or reject from a listed actor. Approve makes the WorkflowDecisionRecord the gate’s value; reject skips dependent tasks and fails the run. Throws on a blank prompt or on empty, blank or duplicate actors; scheduling it without a checkpoint throws.
Complete example and detailed rules.
Parameters and properties
Section titled “Parameters and properties”optionsRequiredWorkflowGateOptionsGate key, dependencies, prompt, actors allowed to approve or reject, and the optional signed authentication.options.authenticationOptional"signed" | undefinedSet to signed to require a verified Ed25519 proof on every decision for this gate. Stored in the gate and in checkpoint identity.options.keyRequiredstringTask key of the gate, unique in the workflow and named by each decision. Letters, digits, dot, underscore and hyphen, starting with a letter or digit.options.afterOptionalreadonly Task<unknown>[] | undefinedTasks that must be done before the gate pauses. If one fails or is skipped, cancelled or rejected, the gate is skipped.options.promptRequiredstringQuestion put to the actors, copied into the pending request. A blank prompt throws.options.actorsRequiredreadonly string[]Names allowed to decide the gate: at least one, unique and nonblank. Outpost trusts the actor your application submits unless the gate is signed.