call
Call a workflow — in-process when possible, otherwise via the HTTP API.
Call a workflow — in-process when possible, otherwise via the HTTP API.
Signature
call(workflow: 'workflow_cls | str', *args, mode: "Literal['sync', 'async']" = 'sync')
Call a workflow — in-process when possible, otherwise via the HTTP API.
Args: workflow: The workflow to call (workflow object or string name). *args: Arguments passed to the workflow. mode: Execution mode — “sync” waits for completion and returns output, “async” submits and returns the execution_id immediately.
Returns: mode=“sync”: The workflow output. mode=“async”: The execution_id (str).
A mode="sync" call whose target is a transient workflow object
takes the same-worker fast path: the sub-workflow executes in this
process with no server round-trip and no execution row (disable with
[flux.workers] transient_fast_path = false). Everything else —
string references, durable targets, mode="async" — goes through the
server, which owns the durable lifecycle and service discovery.
Generated from flux/call. Last verified against Flux 0.56.0.