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
, Name
>(def
, ...args
): Promise
<void
>
Signal a running Workflow.
Type parameters
Name | Type |
---|---|
Args | extends any [] = [] |
Name | extends string = string |
Parameters
Name | Type | Description |
---|---|---|
def | string | SignalDefinition <Args , Name > | a signal definition as returned from defineSignal or signal name (string) |
...args | Args | - |
Returns
Promise
<void
>
Example
await handle.signal(incrementSignal, 3);