childworkflow
Experimental. For evaluation. Interfaces, configuration, and behavior may change incompatibly.
Launches and tracks child workflows within a tenant.
Prerequisites
- Active child workflow script in the same tenant.
Setup
- Loads automatically; no configuration needed.
- See the child workflow guide for registering and launching child workflows.
Launch child workflows. Returns a handle that can be awaited directly via get() or used as an event source with patterns.select().
Members
ParentClosePolicy
childworkflow.ParentClosePolicychildworkflow.ParentClosePolicyTemporal policies controlling a child when its parent closes.
run_workflow
childworkflow.run_workflow(script_name, workflow_name, args, workflow_id?, detached?, parent_close_policy?)Launch a child workflow. Returns immediately with a handle. Call handle.get() to block for the result, or use the handle as a key in patterns.select() for event-driven composition.
Parameters
script_namestringRegistered Remediation Orchestrator script containing the workflow.workflow_namestringStarlark function name to invoke in the child script.argsdict[string:any]Arguments dict passed to the child workflow function.workflow_id?optionalstringExplicit Temporal workflow ID. If empty, uses the workflow’s id_function or generates one.detached?optionalboolIf true, use a disconnected workflow context so parent-context cancellation, including REPL cell exit, does not propagate to the child. The parent_close_policy still applies when the parent closes. To survive both, use detached=True with ParentClosePolicy.ABANDON.parent_close_policy?optionalintA childworkflow.ParentClosePolicy value applied to a running child after its parent closes, including completion, failure, cancellation, or termination. Applies even when detached=True. ABANDON does not prevent cancellation through an attached parent context. Omitted or unsupported values use ABANDON.Returns
handlechildworkflow.ChildWorkflowHandleChildWorkflowHandle with get() method and patterns.select() compatibility.