Skip to main content

Interface: ExternalWorkflowHandle

workflow.ExternalWorkflowHandle

Handle representing an external Workflow Execution.

This handle only has methods cancel and signal. To call other methods, like query and result, use WorkflowClient.getHandle inside an Activity.

Properties

runId

Optional Readonly runId: string

An optional runId of the external Workflow


workflowId

Readonly workflowId: string

The workflowId of the external Workflow

Methods

cancel

cancel(): Promise<void>

Cancel the external Workflow execution.

Throws if the Workflow execution does not exist.

Returns

Promise<void>


signal

signal<Args>(def, ...args): Promise<void>

Signal a running Workflow.

Example

await handle.signal(incrementSignal, 3);

Type parameters

NameType
Argsextends any[] = []

Parameters

NameTypeDescription
defstring | SignalDefinition<Args>a signal definition as returned from defineSignal or signal name (string)
...argsArgs-

Returns

Promise<void>