docs(workflow): document tailor.workflow.resumeWorkflow#155
Merged
Conversation
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.
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.
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.
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.
anukiransolur
approved these changes
Jul 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The SDK now exposes
tailor.workflow.resumeWorkflow(executionId)on@tailor-platform/sdk/runtime, so user code can resume a failed or pending-retry workflow execution directly instead of shelling out totailor-sdk workflow resumeor using the Tailor Console (tailor-platform/sdk#1608). The workflow guides only documented the CLIresumecommand, so this documents the in-code path that self-healing flows (functions, executors, pipeline resolvers) can use.While documenting it, this also reviews the existing samples in the workflow guides so they no longer wrap runtime results in a
{ success }object.Changes
Document
resumeWorkflowdocs/guides/workflow/monitoring-executions.md— add a Resuming from Code subsection under Resume and Retry. Documentstailor.workflow.resumeWorkflow(executionId): an example that recovers from a transient failure, thestringargument (a failed or pending-retry execution ID) andstringreturn value (the resumed execution ID), the shared cached-result behavior with theresumecommand, and theresumeWorkflow failed:error it rejects with. Uses the globaltailor.workflow.*form to match the existingtriggerWorkflow()examples in the guides.docs/sdk/runtime.mdanddocs/sdk/testing.mdare intentionally not edited here. They are auto-synced from the SDK repo by thesdk-docs-syncworkflow, and tailor-platform/sdk#1608 already updates those source pages (theworkflownamespace list and amockWorkflow().setResumeHandlertesting section).Sample cleanup
The
tailor.workflow.*runtime calls reject on failure, so returning{ success: true }(or catching to return{ success: false }) makes the samples read as if they presuppose try/catch-based error handling. The samples now return the meaningful result directly and let errors propagate as thrown exceptions.docs/guides/workflow/triggering-workflow.md, drop the redundantsuccess: truefrom thetriggerWorkflow()example return.docs/guides/workflow/creating-workflows.md, dropsuccess: truefrom the multi-step example, and simplify the error-handling sample toreturn { result }. Itstry/catchstays, since re-throwing a wrapped error message is the case where catching is warranted.docs/guides/workflow/monitoring-executions.md, write the new Resuming from Code example so it lets the error propagate instead of catching it into a{ success }object.Verification
pnpm build✅ (pages render; new#resuming-from-codeanchor generated)pnpm lint✅ (no new issues; only a pre-existingsitemap.tsunused-param warning)npx tsx scripts/validate-schema.mtsmdschemais not installed in this environment (mdschema: command not found); no doc-structure change was made (a new h3 under an existing h2, no heading-level skips)