Skip to main content

Interface: WorkflowHandleWithFirstExecutionRunId<T>

client.WorkflowHandleWithFirstExecutionRunId

This interface is exactly the same as WorkflowHandle except it includes the firstExecutionRunId returned from start.

Type parameters

NameType
Textends Workflow = Workflow

Hierarchy

Properties

client

Readonly client: WorkflowClient

Readonly accessor to the underlying WorkflowClient

Inherited from

WorkflowHandle.client


firstExecutionRunId

Readonly firstExecutionRunId: string

Run Id of the first Execution in the Workflow Execution Chain.


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