Skip to main content

Interface: BaseWorkflowHandle<T>

workflow.BaseWorkflowHandle

Base WorkflowHandle interface, extended in workflow and client libs.

Transforms a workflow interface T into a client interface.

Type parameters

NameType
Textends Workflow

Properties

workflowId

Readonly workflowId: string

The workflowId of the current Workflow

Methods

result

result(): Promise<WorkflowResultType<T>>

Promise that resolves when Workflow execution completes

Returns

Promise<WorkflowResultType<T>>


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
...argsArgs-

Returns

Promise<void>