Skip to content

Human approval

Use this when a step needs a person to approve or reject before the run goes on.

human-approval/assembly-line.yaml
# yaml-language-server: $schema=https://re-cinq.github.io/floor/schemas/pipeline.schema.json
line:
id: human-approval
entry: approve
exit: done
fail: declined
start:
on:
- release.requested
args:
release: "{release}"
args:
release:
kind: value
subject: true
nodes:
- id: approve
station: approve-release
reports:
- on: release.answered
when:
decision: approved
outcome: approved
- on: release.answered
when:
decision: rejected
outcome: rejected
- id: done
- id: declined
edges:
- from: approve
to: done
on: approved
- from: approve
to: declined
on: rejected
stations:
approve-release:
description: A person approves or rejects the release.
kind: human
outcomes:
- approved
- rejected
needs:
- name: release
kind: value
produces: []
  1. The approve-release station has kind human, so its visit waits with no deadline.
  2. The node’s reports list the events that answer it. Each entry has an on, a when and the outcome it reports.
  3. The edges approved and rejected take the run to done or to declined.
  4. To answer, post an event that names the run by subjectKey:
{
"name": "release.answered",
"payload": { "subjectKey": "release:v1.4", "decision": "approved" }
}

See Nodes and Events for a running run.