Temporal Activity

In day-to-day conversation, the term “Activity” denotes an:

  • Activity Type, the mapping of a name to an Activity Definition,
  • Activity Definition, the code that defines the constraints of an Activity Task Execution,
  • or Activity Execution, the full chain of Activity Task Execution, which occurs when a Worker uses the context provided from the Activity Task and executes the Activity Definition.

The activities are the execution, encapsulates parts of the Workflow that are prone to failure.

Activity Definition

activity definition

Activity Execution

An Activity Execution is the full chain of Activity Task Executions.

Activity Task

Transclude of 2024-07-23-temporal-activity_task_states.excalidraw

Activity Timeouts

activity timeouts|800

Temporal has four timeouts — two that are commonly used, and two that are useful only in specific cases:

  • Schedule-To-Close: Limits the maximum execution time including retries.
  • Start-To-Close: Limits the maximum execution time of a single execution. We recommend ALWAYS setting this!
  • Heartbeat: Limits the maximum time between Heartbeats. For long running Activities, enables a quicker response when a Heartbeat fails to be recorded.
  • Schedule-To-Start: Limits the maximum time that an Activity Task can sit in a Task Queue. Mainly to identify whether a Worker is down or for Task routing. This is rarely needed!