Skip to main content

Enumeration: ActivityExecutionStatus

enums.v1.ActivityExecutionStatus

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

Enumeration Members

ACTIVITY_EXECUTION_STATUS_CANCELED

ACTIVITY_EXECUTION_STATUS_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.


ACTIVITY_EXECUTION_STATUS_COMPLETED

ACTIVITY_EXECUTION_STATUS_COMPLETED = 2

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


ACTIVITY_EXECUTION_STATUS_FAILED

ACTIVITY_EXECUTION_STATUS_FAILED = 3

The activity failed. Causes:

  • Worker returned a non-retryable failure
  • RetryPolicy.maximum_attempts exhausted
  • Attempt failed after cancellation was requested (retries blocked)

ACTIVITY_EXECUTION_STATUS_PAUSED

ACTIVITY_EXECUTION_STATUS_PAUSED = 7

The activity is paused. Paused state is only reachable after calling PauseActivityExecution on a standalone activity.


ACTIVITY_EXECUTION_STATUS_RUNNING

ACTIVITY_EXECUTION_STATUS_RUNNING = 1

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


ACTIVITY_EXECUTION_STATUS_TERMINATED

ACTIVITY_EXECUTION_STATUS_TERMINATED = 5

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


ACTIVITY_EXECUTION_STATUS_TIMED_OUT

ACTIVITY_EXECUTION_STATUS_TIMED_OUT = 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).

ACTIVITY_EXECUTION_STATUS_UNSPECIFIED

ACTIVITY_EXECUTION_STATUS_UNSPECIFIED = 0

ACTIVITY_EXECUTION_STATUS_UNSPECIFIED value