Class: AsyncCompletionClient
client.AsyncCompletionClient
A client for asynchronous completion and heartbeating of Activities.
Typically this client should not be instantiated directly, instead create the high level Client and use Client.activity to complete async activities.
Hierarchy
-
BaseClient
↳
AsyncCompletionClient
Constructors
constructor
• new AsyncCompletionClient(options?
): AsyncCompletionClient
Parameters
Name | Type |
---|---|
options? | BaseClientOptions |
Returns
Overrides
BaseClient.constructor
Properties
connection
• Readonly
connection: ConnectionLike
Inherited from
BaseClient.connection
options
• Readonly
options: LoadedAsyncCompletionClientOptions
Accessors
workflowService
• get
workflowService(): WorkflowService
Raw gRPC access to the Temporal service.
NOTE: The namespace provided in options is not automatically set on requests made via this service object.
Returns
Methods
complete
▸ complete(taskToken
, result
): Promise
<void
>
Complete an Activity by task token
Parameters
Name | Type |
---|---|
taskToken | Uint8Array |
result | unknown |
Returns
Promise
<void
>
▸ complete(fullActivityId
, result
): Promise
<void
>
Complete an Activity by full ID
Parameters
Name | Type |
---|---|
fullActivityId | FullActivityId |
result | unknown |
Returns
Promise
<void
>
fail
▸ fail(taskToken
, err
): Promise
<void
>
Fail an Activity by task token
Parameters
Name | Type |
---|---|
taskToken | Uint8Array |
err | unknown |
Returns
Promise
<void
>
▸ fail(fullActivityId
, err
): Promise
<void
>
Fail an Activity by full ID
Parameters
Name | Type |
---|---|
fullActivityId | FullActivityId |
err | unknown |
Returns
Promise
<void
>
heartbeat
▸ heartbeat(taskToken
, details?
): Promise
<void
>
Send Activity heartbeat by task token
Parameters
Name | Type |
---|---|
taskToken | Uint8Array |
details? | unknown |
Returns
Promise
<void
>
▸ heartbeat(fullActivityId
, details?
): Promise
<void
>
Send Activity heartbeat by full ID
Parameters
Name | Type |
---|---|
fullActivityId | FullActivityId |
details? | unknown |
Returns
Promise
<void
>
reportCancellation
▸ reportCancellation(taskToken
, details?
): Promise
<void
>
Report Activity cancellation by task token
Parameters
Name | Type |
---|---|
taskToken | Uint8Array |
details? | unknown |
Returns
Promise
<void
>
▸ reportCancellation(fullActivityId
, details?
): Promise
<void
>
Report Activity cancellation by full ID
Parameters
Name | Type |
---|---|
fullActivityId | FullActivityId |
details? | unknown |
Returns
Promise
<void
>
withAbortSignal
▸ withAbortSignal<R
>(abortSignal
, fn
): Promise
<R
>
Set an AbortSignal
that, when aborted,
cancels any ongoing service requests executed in fn
's scope.
Type parameters
Name |
---|
R |
Parameters
Name | Type |
---|---|
abortSignal | AbortSignal |
fn | () => Promise <R > |
Returns
Promise
<R
>
value returned from fn
See
Inherited from
BaseClient.withAbortSignal