Human Approval
Pause a workflow for review, then resume the correct branch from an external approval surface.
Use a human approval pattern when a workflow can prepare a decision but should not complete the side effect without review.
Pattern
texttrigger -> prepare context -> notify reviewer -> wait/resume -> approved branch or rejected branch
Human approval path
Resume API
When a run is waiting on a node, resume it with:
bashcurl -X POST "https://api.b3os.org/v1/runs/$RUN_ID/nodes/$NODE_ID/resume" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "payload": { "approved": true, "reviewer": "ops@example.com", "reason": "Within policy" } }'
Approval Payload
Keep approval payloads small and auditable.
| Field | Purpose |
|---|---|
| approved | Boolean branch selector. |
| reviewer | Human or system that made the decision. |
| reason | Short explanation for audit history. |
| expiresAt | Optional deadline used by your external approval UI. |
Subscribe to node waiting events, create an approval task in your system, and call the resume endpoint after the reviewer acts.
