Interface: ChildWorkflowHandle<T>
workflow.ChildWorkflowHandle
A client side handle to a single Workflow instance. It can be used to signal, wait for completion, and cancel a Workflow execution.
Given the following Workflow definition:
export const incrementSignal = defineSignal('increment');
export async function counterWorkflow(initialValue: number): Promise<void>;
Start a new Workflow execution and get a handle for interacting with it:
// Start the Workflow with initialValue of 2.
const handle = await startWorkflow(counterWorkflow, { args: [2] });
await handle.signal(incrementSignal, 2);
await handle.result(); // throws WorkflowExecutionTerminatedError
Type parameters
| Name | Type |
|---|---|
T | extends Workflow |
Hierarchy
-
↳
ChildWorkflowHandle
Properties
firstExecutionRunId
• Readonly firstExecutionRunId: string
The runId of the initial run of the bound Workflow
workflowId
• Readonly workflowId: string
The workflowId of the current Workflow