Table of Contents

Class ActivityExecutionInfo

Namespace
Temporalio.Api.Activity.V1
Assembly
Temporalio.dll

Information about a standalone activity.

public sealed class ActivityExecutionInfo : IMessage<ActivityExecutionInfo>, IEquatable<ActivityExecutionInfo>, IDeepCloneable<ActivityExecutionInfo>, IBufferMessage, IMessage
Inheritance
ActivityExecutionInfo
Implements
IDeepCloneable<ActivityExecutionInfo>
IBufferMessage
IMessage
Inherited Members

Constructors

ActivityExecutionInfo()

public ActivityExecutionInfo()

ActivityExecutionInfo(ActivityExecutionInfo)

public ActivityExecutionInfo(ActivityExecutionInfo other)

Parameters

other ActivityExecutionInfo

Fields

ActivityIdFieldNumber

Field number for the "activity_id" field.

public const int ActivityIdFieldNumber = 1

Field Value

int

ActivityTypeFieldNumber

Field number for the "activity_type" field.

public const int ActivityTypeFieldNumber = 3

Field Value

int

AttemptFieldNumber

Field number for the "attempt" field.

public const int AttemptFieldNumber = 15

Field Value

int

CanceledReasonFieldNumber

Field number for the "canceled_reason" field.

public const int CanceledReasonFieldNumber = 32

Field Value

int

CloseTimeFieldNumber

Field number for the "close_time" field.

public const int CloseTimeFieldNumber = 19

Field Value

int

CurrentRetryIntervalFieldNumber

Field number for the "current_retry_interval" field.

public const int CurrentRetryIntervalFieldNumber = 22

Field Value

int

ExecutionDurationFieldNumber

Field number for the "execution_duration" field.

public const int ExecutionDurationFieldNumber = 16

Field Value

int

ExpirationTimeFieldNumber

Field number for the "expiration_time" field.

public const int ExpirationTimeFieldNumber = 18

Field Value

int

HeaderFieldNumber

Field number for the "header" field.

public const int HeaderFieldNumber = 30

Field Value

int

HeartbeatDetailsFieldNumber

Field number for the "heartbeat_details" field.

public const int HeartbeatDetailsFieldNumber = 12

Field Value

int

HeartbeatTimeoutFieldNumber

Field number for the "heartbeat_timeout" field.

public const int HeartbeatTimeoutFieldNumber = 10

Field Value

int

LastAttemptCompleteTimeFieldNumber

Field number for the "last_attempt_complete_time" field.

public const int LastAttemptCompleteTimeFieldNumber = 23

Field Value

int

LastDeploymentVersionFieldNumber

Field number for the "last_deployment_version" field.

public const int LastDeploymentVersionFieldNumber = 25

Field Value

int

LastFailureFieldNumber

Field number for the "last_failure" field.

public const int LastFailureFieldNumber = 20

Field Value

int

LastHeartbeatTimeFieldNumber

Field number for the "last_heartbeat_time" field.

public const int LastHeartbeatTimeFieldNumber = 13

Field Value

int

LastStartedTimeFieldNumber

Field number for the "last_started_time" field.

public const int LastStartedTimeFieldNumber = 14

Field Value

int

LastWorkerIdentityFieldNumber

Field number for the "last_worker_identity" field.

public const int LastWorkerIdentityFieldNumber = 21

Field Value

int

NextAttemptScheduleTimeFieldNumber

Field number for the "next_attempt_schedule_time" field.

public const int NextAttemptScheduleTimeFieldNumber = 24

Field Value

int

PriorityFieldNumber

Field number for the "priority" field.

public const int PriorityFieldNumber = 26

Field Value

int

RetryPolicyFieldNumber

Field number for the "retry_policy" field.

public const int RetryPolicyFieldNumber = 11

Field Value

int

RunIdFieldNumber

Field number for the "run_id" field.

public const int RunIdFieldNumber = 2

Field Value

int

RunStateFieldNumber

Field number for the "run_state" field.

public const int RunStateFieldNumber = 5

Field Value

int

ScheduleTimeFieldNumber

Field number for the "schedule_time" field.

public const int ScheduleTimeFieldNumber = 17

Field Value

int

ScheduleToCloseTimeoutFieldNumber

Field number for the "schedule_to_close_timeout" field.

public const int ScheduleToCloseTimeoutFieldNumber = 7

Field Value

int

ScheduleToStartTimeoutFieldNumber

Field number for the "schedule_to_start_timeout" field.

public const int ScheduleToStartTimeoutFieldNumber = 8

Field Value

int

SearchAttributesFieldNumber

Field number for the "search_attributes" field.

public const int SearchAttributesFieldNumber = 29

Field Value

int

StartToCloseTimeoutFieldNumber

Field number for the "start_to_close_timeout" field.

public const int StartToCloseTimeoutFieldNumber = 9

Field Value

int

StateSizeBytesFieldNumber

Field number for the "state_size_bytes" field.

public const int StateSizeBytesFieldNumber = 28

Field Value

int

StateTransitionCountFieldNumber

Field number for the "state_transition_count" field.

public const int StateTransitionCountFieldNumber = 27

Field Value

int

StatusFieldNumber

Field number for the "status" field.

public const int StatusFieldNumber = 4

Field Value

int

TaskQueueFieldNumber

Field number for the "task_queue" field.

public const int TaskQueueFieldNumber = 6

Field Value

int

UserMetadataFieldNumber

Field number for the "user_metadata" field.

public const int UserMetadataFieldNumber = 31

Field Value

int

Properties

ActivityId

Unique identifier of this activity within its namespace along with run ID (below).

public string ActivityId { get; set; }

Property Value

string

ActivityType

The type of the activity, a string that maps to a registered activity on a worker.

public ActivityType ActivityType { get; set; }

Property Value

ActivityType

Attempt

The attempt this activity is currently on. Incremented each time a new attempt is scheduled.

public int Attempt { get; set; }

Property Value

int

CanceledReason

Set if activity cancelation was requested.

public string CanceledReason { get; set; }

Property Value

string

CloseTime

Time when the activity transitioned to a closed state.

public Timestamp CloseTime { get; set; }

Property Value

Timestamp

CurrentRetryInterval

Time from the last attempt failure to the next activity retry. If the activity is currently running, this represents the next retry interval in case the attempt fails. If activity is currently backing off between attempt, this represents the current retry interval. If there is no next retry allowed, this field will be null. This interval is typically calculated from the specified retry policy, but may be modified if an activity fails with a retryable application failure specifying a retry delay.

public Duration CurrentRetryInterval { get; set; }

Property Value

Duration

Descriptor

public static MessageDescriptor Descriptor { get; }

Property Value

MessageDescriptor

ExecutionDuration

How long this activity has been running for, including all attempts and backoff between attempts.

public Duration ExecutionDuration { get; set; }

Property Value

Duration

ExpirationTime

Scheduled time + schedule to close timeout.

public Timestamp ExpirationTime { get; set; }

Property Value

Timestamp

Header

public Header Header { get; set; }

Property Value

Header

HeartbeatDetails

Details provided in the last recorded activity heartbeat.

public Payloads HeartbeatDetails { get; set; }

Property Value

Payloads

HeartbeatTimeout

Maximum permitted time between successful worker heartbeats.

public Duration HeartbeatTimeout { get; set; }

Property Value

Duration

LastAttemptCompleteTime

The time when the last activity attempt completed. If activity has not been completed yet, it will be null.

public Timestamp LastAttemptCompleteTime { get; set; }

Property Value

Timestamp

LastDeploymentVersion

The Worker Deployment Version this activity was dispatched to most recently. If nil, the activity has not yet been dispatched or was last dispatched to an unversioned worker.

public WorkerDeploymentVersion LastDeploymentVersion { get; set; }

Property Value

WorkerDeploymentVersion

LastFailure

Failure details from the last failed attempt.

public Failure LastFailure { get; set; }

Property Value

Failure

LastHeartbeatTime

Time the last heartbeat was recorded.

public Timestamp LastHeartbeatTime { get; set; }

Property Value

Timestamp

LastStartedTime

Time the last attempt was started.

public Timestamp LastStartedTime { get; set; }

Property Value

Timestamp

LastWorkerIdentity

public string LastWorkerIdentity { get; set; }

Property Value

string

NextAttemptScheduleTime

The time when the next activity attempt will be scheduled. If activity is currently scheduled or started, this field will be null.

public Timestamp NextAttemptScheduleTime { get; set; }

Property Value

Timestamp

Parser

public static MessageParser<ActivityExecutionInfo> Parser { get; }

Property Value

MessageParser<ActivityExecutionInfo>

Priority

Priority metadata.

public Priority Priority { get; set; }

Property Value

Priority

RetryPolicy

The retry policy for the activity. Will never exceed schedule_to_close_timeout.

public RetryPolicy RetryPolicy { get; set; }

Property Value

RetryPolicy

RunId

public string RunId { get; set; }

Property Value

string

RunState

More detailed breakdown of ACTIVITY_EXECUTION_STATUS_RUNNING.

public PendingActivityState RunState { get; set; }

Property Value

PendingActivityState

ScheduleTime

Time the activity was originally scheduled via a StartActivityExecution request.

public Timestamp ScheduleTime { get; set; }

Property Value

Timestamp

ScheduleToCloseTimeout

Indicates how long the caller is willing to wait for an activity completion. Limits how long retries will be attempted.

(-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "to" is used to indicate interval. --)

public Duration ScheduleToCloseTimeout { get; set; }

Property Value

Duration

ScheduleToStartTimeout

Limits time an activity task can stay in a task queue before a worker picks it up. This timeout is always non retryable, as all a retry would achieve is to put it back into the same queue. Defaults to schedule_to_close_timeout.

(-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "to" is used to indicate interval. --)

public Duration ScheduleToStartTimeout { get; set; }

Property Value

Duration

SearchAttributes

public SearchAttributes SearchAttributes { get; set; }

Property Value

SearchAttributes

StartToCloseTimeout

Maximum time a single activity attempt is allowed to execute after being picked up by a worker. This timeout is always retryable.

(-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "to" is used to indicate interval. --)

public Duration StartToCloseTimeout { get; set; }

Property Value

Duration

StateSizeBytes

Updated once on scheduled and once on terminal status.

public long StateSizeBytes { get; set; }

Property Value

long

StateTransitionCount

Incremented each time the activity's state is mutated in persistence.

public long StateTransitionCount { get; set; }

Property Value

long

Status

A general status for this activity, indicates whether it is currently running or in one of the terminal statuses.

public ActivityExecutionStatus Status { get; set; }

Property Value

ActivityExecutionStatus

TaskQueue

public string TaskQueue { get; set; }

Property Value

string

UserMetadata

Metadata for use by user interfaces to display the fixed as-of-start summary and details of the activity.

public UserMetadata UserMetadata { get; set; }

Property Value

UserMetadata

Methods

CalculateSize()

Calculates the size of this message in Protocol Buffer wire format, in bytes.

public int CalculateSize()

Returns

int

The number of bytes required to write this message to a coded output stream.

Clone()

Creates a deep clone of this object.

public ActivityExecutionInfo Clone()

Returns

ActivityExecutionInfo

A deep clone of this object.

Equals(object)

Determines whether the specified object is equal to the current object.

public override bool Equals(object other)

Parameters

other object

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

Equals(ActivityExecutionInfo)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(ActivityExecutionInfo other)

Parameters

other ActivityExecutionInfo

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

MergeFrom(CodedInputStream)

Merges the data from the specified coded input stream with the current message.

public void MergeFrom(CodedInputStream input)

Parameters

input CodedInputStream

Remarks

See the user guide for precise merge semantics.

MergeFrom(ActivityExecutionInfo)

Merges the given message into this one.

public void MergeFrom(ActivityExecutionInfo other)

Parameters

other ActivityExecutionInfo

Remarks

See the user guide for precise merge semantics.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

WriteTo(CodedOutputStream)

Writes the data to the given coded output stream.

public void WriteTo(CodedOutputStream output)

Parameters

output CodedOutputStream

Coded output stream to write the data to. Must not be null.