Skip to main content

Human in the loop

Some steps shouldn't run to completion without a person looking at them first. What actually pauses a run is one flag on the step, params.pauseAfterExecution: true. A Surface is optional on top of that; it just controls what the reviewer sees instead of the platform's default resume form.

How a pause actually works​

Set pauseAfterExecution: true directly, or attach a Surface to the step's wait slot and let the Kit set it for you during serialization. Either way the step pauses the same way:

const approval = new Step({
id: 'manager-approval',
name: 'Manager Approval',
type: 'core.set',
params: { values: { reviewer: 'manager' } },
ui: { wait: approvalSurface },
})

When execution reaches that step, the engine pauses the run and it shows up in the Console's Inbox for a reviewer to act on:

A paused workflow step in the Console Inbox, showing the reviewer's surface with an approve/reject action.

Approving resumes the run; rejecting halts it. Either way, whatever the reviewer entered on the surface comes back as part of the workflow's data, not just a bare yes or no. The pause itself is durable. The engine holds run state until someone acts, whether that's thirty seconds or thirty days later.

See Surfaces overview and Create and link surfaces for the full authoring model.

Not on the roadmap yet​

Multi-approver surfaces (more than one person needs to sign off) and SLA timers that auto-escalate an unapproved wait are not shipped yet.