Skip to main content

Class: AsyncCompletionClient

client.AsyncCompletionClient

A client for asynchronous completion and heartbeating of Activities.

Constructors

constructor

new AsyncCompletionClient(options?)

Parameters

NameType
options?AsyncCompletionClientOptions

Properties

connection

Readonly connection: ConnectionLike


options

Readonly options: AsyncCompletionClientOptionsWithDefaults

Accessors

workflowService

get workflowService(): WorkflowService

Returns

WorkflowService

Methods

complete

complete(taskToken, result): Promise<void>

Complete an Activity by task token

Parameters

NameType
taskTokenUint8Array
resultunknown

Returns

Promise<void>

complete(fullActivityId, result): Promise<void>

Complete an Activity by full ID

Parameters

NameType
fullActivityIdFullActivityId
resultunknown

Returns

Promise<void>


fail

fail(taskToken, err): Promise<void>

Fail an Activity by task token

Parameters

NameType
taskTokenUint8Array
errunknown

Returns

Promise<void>

fail(fullActivityId, err): Promise<void>

Fail an Activity by full ID

Parameters

NameType
fullActivityIdFullActivityId
errunknown

Returns

Promise<void>


heartbeat

heartbeat(taskToken, details?): Promise<void>

Send Activity heartbeat by task token

Parameters

NameType
taskTokenUint8Array
details?unknown

Returns

Promise<void>

heartbeat(fullActivityId, details?): Promise<void>

Send Activity heartbeat by full ID

Parameters

NameType
fullActivityIdFullActivityId
details?unknown

Returns

Promise<void>


reportCancellation

reportCancellation(taskToken, details?): Promise<void>

Report Activity cancellation by task token

Parameters

NameType
taskTokenUint8Array
details?unknown

Returns

Promise<void>

reportCancellation(fullActivityId, details?): Promise<void>

Report Activity cancellation by full ID

Parameters

NameType
fullActivityIdFullActivityId
details?unknown

Returns

Promise<void>