You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: apps/docs/content/docs/en/blocks/human-in-the-loop.mdx
+17-5Lines changed: 17 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -126,26 +126,38 @@ Access resume data in downstream blocks using `<blockId.fieldName>`.
126
126
127
127
- **Stream mode** (`stream: true` on the original execute call) — The resume response streams SSE events with `selectedOutputs` chunks, just like the initial execution.
128
128
129
-
- **Async mode** (`X-Execution-Mode: async` on the original execute call) — The resume dispatches execution to a background worker and returns immediately with `202`:
129
+
- **Async mode** (`X-Execution-Mode: async` on the original execute call) — The resume dispatches execution to a background worker and returns immediately with `202`, including a `jobId` and `statusUrl` for polling:
130
130
131
131
```json
132
132
{
133
-
"status": "started",
133
+
"success": true,
134
+
"async": true,
135
+
"jobId": "<jobId>",
134
136
"executionId": "<resumeExecutionId>",
135
-
"message": "Resume execution started asynchronously."
137
+
"message": "Resume execution queued",
138
+
"statusUrl": "/api/jobs/<jobId>"
136
139
}
137
140
```
138
141
139
142
#### Polling execution status
140
143
141
-
To check on a paused execution or poll for completion after an async resume:
144
+
Poll the `statusUrl` from the async response to check when the resume completes:
145
+
146
+
```bash
147
+
GET /api/jobs/{jobId}
148
+
X-API-Key: your-api-key
149
+
```
150
+
151
+
Returns job status and, when completed, the full workflow output.
152
+
153
+
To check on a paused execution's pause points and resume links:
142
154
143
155
```bash
144
156
GET /api/resume/{workflowId}/{executionId}
145
157
X-API-Key: your-api-key
146
158
```
147
159
148
-
Returns the full paused execution detail with all pause points, their statuses, and resume links. Returns `404` when the execution has completed and is no longer paused.
160
+
Returns the paused execution detail with all pause points, their statuses, and resume links. Returns `404` when the execution has completed and is no longer paused.
0 commit comments