Table of Contents

Enum ActivityExecutionStatus

Namespace
Temporalio.Api.Enums.V1
Assembly
Temporalio.dll

Status of a standalone activity. The status is updated once, when the activity is originally scheduled, and again when the activity reaches a terminal status. (-- api-linter: core::0216::synonyms=disabled aip.dev/not-precedent: Named consistently with WorkflowExecutionStatus. --)

public enum ActivityExecutionStatus

Fields

[OriginalName("ACTIVITY_EXECUTION_STATUS_CANCELED")] Canceled = 4

The activity was canceled. Reached when:

  • Cancellation requested while SCHEDULED (immediate), or
  • Cancellation requested while STARTED and worker called RespondActivityTaskCanceled.

Workers discover cancellation requests via heartbeat responses (cancel_requested=true). Activities that do not heartbeat will not learn of cancellation and may complete, fail, or time out normally. CANCELED requires explicit worker acknowledgment or immediate cancellation of a SCHEDULED activity.

[OriginalName("ACTIVITY_EXECUTION_STATUS_COMPLETED")] Completed = 2

The activity completed successfully. An activity can complete even after cancellation is requested if the worker calls RespondActivityTaskCompleted before acknowledging cancellation.

[OriginalName("ACTIVITY_EXECUTION_STATUS_FAILED")] Failed = 3

The activity failed. Causes:

  • Worker returned a non-retryable failure
  • RetryPolicy.maximum_attempts exhausted
  • Attempt failed after cancellation was requested (retries blocked)
[OriginalName("ACTIVITY_EXECUTION_STATUS_RUNNING")] Running = 1

The activity has not reached a terminal status. See PendingActivityState for the run state (SCHEDULED, STARTED, or CANCEL_REQUESTED).

[OriginalName("ACTIVITY_EXECUTION_STATUS_TERMINATED")] Terminated = 5

The activity was terminated. Immediate; does not wait for worker acknowledgment.

[OriginalName("ACTIVITY_EXECUTION_STATUS_TIMED_OUT")] TimedOut = 6

The activity timed out. See TimeoutType for the specific timeout.

  • SCHEDULE_TO_START and SCHEDULE_TO_CLOSE timeouts always result in TIMED_OUT.
  • START_TO_CLOSE and HEARTBEAT may retry if RetryPolicy permits; TIMED_OUT is reached when retry is blocked (RetryPolicy.maximum_attempts exhausted, SCHEDULE_TO_CLOSE would be exceeded, or cancellation has been requested).
[OriginalName("ACTIVITY_EXECUTION_STATUS_UNSPECIFIED")] Unspecified = 0