Commit 82a8b0f
authored
docs(workflow): document tailor.workflow.resumeWorkflow (#155)
* docs(workflow): document tailor.workflow.resumeWorkflow
The SDK now exposes `tailor.workflow.resumeWorkflow(executionId)` so user
code can resume a failed or pending-retry execution directly
(tailor-platform/sdk#1608). The workflow guides only covered the
`tailor-sdk workflow resume` CLI command, leaving self-healing flows
(functions, executors, pipeline resolvers) with no in-code path to point
readers at. Add a "Resuming from Code" subsection to the monitoring guide
covering the API, its return value, and the error it rejects with.
* docs(workflow): return results directly in workflow samples
Review the workflow guide samples for the same result-object smell fixed
in the IdP guide. The `tailor.workflow.*` runtime calls reject on
failure, so wrapping their results in `{ success: true }` (and, in the
resumeWorkflow example, catching to return `{ success: false }`) made the
samples read as if they presuppose try/catch-based error handling.
Drop the redundant `success` field from the triggerWorkflow, multi-step,
and error-handling samples, and rewrite the resumeWorkflow example to let
the error propagate. Keep the one try/catch that re-throws a wrapped
message, since controlling the error message is the case where catching
is warranted.
* docs(workflow): clarify resumeWorkflow example and resume semantics
Apply Copilot review feedback on the Resuming from Code section.
- Use `args.executionId` in the example so it matches the
`resumeWorkflow(executionId)` signature and the `executionId` term used
elsewhere in the guide.
- Reword the behavior paragraph to match the "restart from main, reuse
cached results" mechanics described earlier in the section, rather than
the looser "resumes from the point of failure" phrasing.
* docs(workflow): mention pending-retry in Resuming from Code intro
Apply Copilot review feedback. The intro said "a failed execution" while
the API reference below and the SDK changeset both cover "failed or
pending-retry" executions, so widen the intro to match and avoid
implying resumeWorkflow cannot resume pending-retry executions.1 parent 876c9f0 commit 82a8b0f
3 files changed
Lines changed: 25 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
193 | 192 | | |
194 | 193 | | |
195 | 194 | | |
| |||
239 | 238 | | |
240 | 239 | | |
241 | 240 | | |
242 | | - | |
| 241 | + | |
243 | 242 | | |
244 | 243 | | |
245 | 244 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
207 | 231 | | |
208 | 232 | | |
209 | 233 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | 35 | | |
37 | 36 | | |
38 | 37 | | |
| |||
0 commit comments