Skip to main content

Interface: WorkflowHandleWithSignaledRunId<T>

client.WorkflowHandleWithSignaledRunId

This interface is exactly the same as WorkflowHandle except it includes the signaledRunId returned from signalWithStart.

Type parameters

NameType
Textends Workflow = Workflow

Hierarchy

Properties

client

Readonly client: WorkflowClient

Readonly accessor to the underlying WorkflowClient

Inherited from

WorkflowHandle.client


signaledRunId

Readonly signaledRunId: string

The Run Id of the bound Workflow at the time of WorkflowClient.signalWithStart.

Since signalWithStart may have signaled an existing Workflow Chain, signaledRunId might not be the firstExecutionRunId.


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