context.invoke()
triggers another workflow run and pauses until the invoked workflow finishes.
The calling workflow resumes once the invoked workflow either succeeds, fails, or is canceled.
Workflows can only invoke other workflows that were served together in the same
serveMany
route.
For details, see Invoke other workflows.Arguments
The workflow definition to invoke.
Must be a workflow exposed under the same
serveMany
.The payload to send to the invoked workflow.
This value will be set as
context.requestPayload
in the invoked workflow.Optional HTTP headers to forward to the invoked workflow.
This value will be set as
context.headers
in the invoked workflow.Override the workflow run ID for the invoked workflow.
Defaults to a new ID if not specified.
Number of retry attempts configuration of the invoked workflow.
Defaults to
3
. Retries use exponential backoff.Delay between retries of the invoked workflow.
Flow control configuration of the invoked workflow.See Flow Control for details.
Whether to automatically stringify the body as JSON. Defaults to
true
If set to false
, the body will be required to be a string and will be sent as-is.Response
The response body returned by the invoked workflow.
true
if the invoked workflow completed with failure.true
if the invoked workflow was canceled before completion.