Table of Contents

Class ActivityExecutionDescription

Namespace
Temporalio.Client
Assembly
Temporalio.dll

Description of a standalone activity execution from a describe call.

public class ActivityExecutionDescription : ActivityExecution
Inheritance
ActivityExecutionDescription
Inherited Members

Constructors

ActivityExecutionDescription(DescribeActivityExecutionResponse, string, DataConverter)

Initializes a new instance of the ActivityExecutionDescription class.

protected ActivityExecutionDescription(DescribeActivityExecutionResponse resp, string clientNamespace, DataConverter dataConverter)

Parameters

resp DescribeActivityExecutionResponse

Raw proto response.

clientNamespace string

Client namespace.

dataConverter DataConverter

Data converter.

Remarks

WARNING: This constructor may be mutated in backwards incompatible ways.

Properties

Attempt

Gets the current attempt number, starting at 1.

public int Attempt { get; }

Property Value

int

CanceledReason

Gets the reason for cancellation, if cancel was requested.

public string? CanceledReason { get; }

Property Value

string

CurrentRetryInterval

Gets the time until the next retry, if applicable.

public TimeSpan? CurrentRetryInterval { get; }

Property Value

TimeSpan?

ExpirationTime

Gets the schedule time plus schedule-to-close timeout.

public DateTime? ExpirationTime { get; }

Property Value

DateTime?

HasHeartbeatDetails

Gets a value indicating whether heartbeat details are available.

public bool HasHeartbeatDetails { get; }

Property Value

bool

Remarks

Always false if IncludeHeartbeatDetails was false.

Heartbeat details payloads can be accessed via RawInfo.HeartbeatDetails.Payloads_.

HasInput

Gets a value indicating whether the activity input is available.

public bool HasInput { get; }

Property Value

bool

Remarks

Always false if IncludeInput was false.

Input payloads can be accessed via RawInput.

HasLastFailure

Gets a value indicating whether the last failure is available.

public bool HasLastFailure { get; }

Property Value

bool

Remarks

Always false if IncludeLastFailure was false.

See Also

HasOutcomeFailure

Gets a value indicating whether the outcome failure is available.

public bool HasOutcomeFailure { get; }

Property Value

bool

Remarks

Activity outcome failure is only available if the activity has closed with a failure.

Always false if IncludeOutcome was false.

See Also

HasResult

Gets a value indicating whether the activity result is available.

public bool HasResult { get; }

Property Value

bool

Remarks

Activity result is only available if the activity has completed successfully.

Always false if IncludeOutcome was false.

See Also

HeartbeatTimeout

Gets the heartbeat timeout.

public TimeSpan? HeartbeatTimeout { get; }

Property Value

TimeSpan?

LastAttemptCompleteTime

Gets when the last attempt completed.

public DateTime? LastAttemptCompleteTime { get; }

Property Value

DateTime?

LastDeploymentVersion

Gets the worker deployment version this activity was dispatched to most recently.

public WorkerDeploymentVersion? LastDeploymentVersion { get; }

Property Value

WorkerDeploymentVersion

LastHeartbeatTime

Gets the time of the last heartbeat.

public DateTime? LastHeartbeatTime { get; }

Property Value

DateTime?

LastStartedTime

Gets when the last attempt was started.

public DateTime? LastStartedTime { get; }

Property Value

DateTime?

LastWorkerIdentity

Gets the identity of the last worker that processed the activity.

public string? LastWorkerIdentity { get; }

Property Value

string

NextAttemptScheduleTime

Gets when the next attempt will be scheduled.

public DateTime? NextAttemptScheduleTime { get; }

Property Value

DateTime?

Priority

Gets the priority metadata.

public Priority Priority { get; }

Property Value

Priority

RawInfo

Gets the raw proto info.

public ActivityExecutionInfo RawInfo { get; }

Property Value

ActivityExecutionInfo

RawInput

Gets the raw proto input.

public IReadOnlyCollection<Payload>? RawInput { get; }

Property Value

IReadOnlyCollection<Payload>

RawOutcome

Gets the raw proto outcome.

public ActivityExecutionOutcome? RawOutcome { get; }

Property Value

ActivityExecutionOutcome

RetryPolicy

Gets the retry policy for the activity.

public RetryPolicy? RetryPolicy { get; }

Property Value

RetryPolicy

RunState

Gets the more detailed run state if the activity status is running.

public PendingActivityState RunState { get; }

Property Value

PendingActivityState

ScheduleToCloseTimeout

Gets the schedule-to-close timeout.

public TimeSpan? ScheduleToCloseTimeout { get; }

Property Value

TimeSpan?

ScheduleToStartTimeout

Gets the schedule-to-start timeout.

public TimeSpan? ScheduleToStartTimeout { get; }

Property Value

TimeSpan?

StartDelay

Gets the time to wait before making the first activity task available for dispatch.

public TimeSpan? StartDelay { get; }

Property Value

TimeSpan?

StartToCloseTimeout

Gets the start-to-close timeout.

public TimeSpan? StartToCloseTimeout { get; }

Property Value

TimeSpan?

TotalHeartbeatCount

Gets the total number of heartbeats recorded across all attempts of this activity, including retries.

Zero if the activity has not sent any heartbeats or if the server didn't report heartbeat count.

public long TotalHeartbeatCount { get; }

Property Value

long

Methods

GetLastFailureAsync()

Gets the failure from the last failed attempt, or null if not available.

public Task<Exception?> GetLastFailureAsync()

Returns

Task<Exception>

Last failure, or null if not available.

Remarks

Always null if IncludeLastFailure was false.

See Also

GetOutcomeFailureAsync()

Gets the failure of the activity execution, or null if not available.

public Task<Exception?> GetOutcomeFailureAsync()

Returns

Task<Exception>

Activity outcome failure, or null if not available.

Remarks

Activity outcome failure is only available if the activity has closed with a failure.

Always null if IncludeOutcome was false.

See Also

GetResultAsync<T>()

Gets the result of the activity execution, or null if not available.

public Task<T?> GetResultAsync<T>()

Returns

Task<T>

Activity result, or null if not available.

Type Parameters

T

Type to convert the result into.

Remarks

Activity result is only available if the activity has completed successfully.

Always null if IncludeOutcome was false.

If T is a non-nullable value type, an unavailable result is indistinguishable from a converted one. Use a nullable type argument (GetResultAsync<int?>()) or check HasResult to disambiguate.

See Also

GetStaticDetailsAsync()

Gets the general fixed details for this activity execution that may appear in UI/CLI. This can be in Temporal markdown format and can span multiple lines.

public Task<string?> GetStaticDetailsAsync()

Returns

Task<string>

Static details.

GetSummaryAsync()

Gets the single-line fixed summary for this activity execution that may appear in UI/CLI. This can be in single-line Temporal markdown format.

public Task<string?> GetSummaryAsync()

Returns

Task<string>

Activity summary.