Skip to main content

Interface: WorkflowHandleWithRunId<T>

client.WorkflowHandleWithRunId

This interface is exactly the same as WorkflowHandle except it includes the originalRunId returned after starting a new Workflow.

Type parameters

NameType
Textends Workflow = Workflow

Hierarchy

Properties

client

Readonly client: WorkflowClient

Readonly accessor to the underlying WorkflowClient

Inherited from

WorkflowHandle.client


originalRunId

Readonly originalRunId: string

The runId of the initial run of the bound Workflow


workflowId

Readonly workflowId: string

The workflowId of the current Workflow

Inherited from

WorkflowHandle.workflowId

Methods

cancel

cancel(): Promise<IRequestCancelWorkflowExecutionResponse>

Cancel a running Workflow

Returns

Promise<IRequestCancelWorkflowExecutionResponse>

Inherited from

WorkflowHandle.cancel


describe

describe(): Promise<WorkflowExecutionDescription>

Describe the current workflow execution

Returns

Promise<WorkflowExecutionDescription>

Inherited from

WorkflowHandle.describe


query

query<Ret, Args>(def, ...args): Promise<Ret>

Query a running or completed Workflow.

example

await handle.query(getValueQuery);
await handle.query<number, []>('getValue');

Type parameters

NameType
RetRet
Argsextends any[] = []

Parameters

NameTypeDescription
defstring | QueryDefinition<Ret, Args>a query definition as returned from defineQuery or query name (string)
...argsArgs-

Returns

Promise<Ret>

Inherited from

WorkflowHandle.query


result

result(): Promise<WorkflowResultType<T>>

Promise that resolves when Workflow execution completes

Returns

Promise<WorkflowResultType<T>>

Inherited from

WorkflowHandle.result


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>

Inherited from

WorkflowHandle.signal


terminate

terminate(reason?): Promise<ITerminateWorkflowExecutionResponse>

Terminate a running Workflow

Parameters

NameType
reason?string

Returns

Promise<ITerminateWorkflowExecutionResponse>

Inherited from

WorkflowHandle.terminate