Table of Contents

Class AsyncActivityHandle

Namespace
Temporalio.Client
Assembly
Temporalio.dll

Handle to perform activity actions for activities that will complete asynchronously.

public record AsyncActivityHandle : IEquatable<AsyncActivityHandle>
Inheritance
AsyncActivityHandle
Implements
Inherited Members

Constructors

AsyncActivityHandle(ITemporalClient, Reference)

Handle to perform activity actions for activities that will complete asynchronously.

public AsyncActivityHandle(ITemporalClient Client, AsyncActivityHandle.Reference Activity)

Parameters

Client ITemporalClient

Client used for async activity handle calls.

Activity AsyncActivityHandle.Reference

Reference to the activity for this handle.

Properties

Activity

Reference to the activity for this handle.

public AsyncActivityHandle.Reference Activity { get; init; }

Property Value

AsyncActivityHandle.Reference

Client

Client used for async activity handle calls.

public ITemporalClient Client { get; init; }

Property Value

ITemporalClient

Methods

CompleteAsync(object?, AsyncActivityCompleteOptions?)

Complete this activity.

public Task CompleteAsync(object? result = null, AsyncActivityCompleteOptions? options = null)

Parameters

result object

Result of the activity.

options AsyncActivityCompleteOptions

Completion options.

Returns

Task

Completion task.

FailAsync(Exception, AsyncActivityFailOptions?)

Fail this activity.

public Task FailAsync(Exception exception, AsyncActivityFailOptions? options = null)

Parameters

exception Exception

Exception for the activity.

options AsyncActivityFailOptions

Fail options.

Returns

Task

Completion task.

HeartbeatAsync(AsyncActivityHeartbeatOptions?)

Issue a heartbeat for this activity.

public Task HeartbeatAsync(AsyncActivityHeartbeatOptions? options = null)

Parameters

options AsyncActivityHeartbeatOptions

Heartbeat options.

Returns

Task

Completion task.

Exceptions

AsyncActivityCanceledException

If the server has requested that this activity be cancelled. Users should catch this and invoke ReportCancellationAsync(AsyncActivityReportCancellationOptions?) for proper behavior.

ReportCancellationAsync(AsyncActivityReportCancellationOptions?)

Report this activity as cancelled.

public Task ReportCancellationAsync(AsyncActivityReportCancellationOptions? options = null)

Parameters

options AsyncActivityReportCancellationOptions

Cancel options.

Returns

Task

Completion task.