Skip to main content

Commands reference

A CommandLink preview iconWhat is a Command?

A Command is a requested action issued by a Worker to the Temporal Cluster after a Workflow Task Execution completes.

Learn more is a requested action issued by a WorkerLink preview iconWhat is a Worker?

In day-to-day conversations, the term Worker is used to denote both a Worker Program and a Worker Process. Temporal documentation aims to be explicit and differentiate between them.

Learn more to the Temporal ClusterLink preview iconWhat is a Temporal Cluster?

A Temporal Cluster is the Temporal Server paired with persistence.

Learn more after a Workflow Task ExecutionLink preview iconWhat is a Workflow Task Execution?

A Workflow Task Execution occurs when a Worker picks up a Workflow Task and uses it to make progress on the execution of a Workflow Definition.

Learn more completes.

The following is a complete list of possible Commands.

CompleteWorkflowExecution

This Command is triggered when the Workflow Function Execution returns. It indicates to the Cluster that the Workflow Execution is complete. The corresponding EventLink preview iconWhat is an Event?

Events are created by the Temporal Cluster in response to external occurrences and Commands generated by a Workflow Execution.

Learn more for this Command is one of the few Events that will be the last in a Workflow Execution Event HistoryLink preview iconWhat is an Event History?

An append log of Events that represents the full state a Workflow Execution.

Learn more.

  • Awaitable: No, a Workflow Execution can not await on the action resulting from this Command.
  • Corresponding Event: WorkflowExecutionCompleted

ContinueAsNewWorkflowExecution

This Command is triggered when there is a call to Continue-As-NewLink preview iconWhat is Continue-As-New?

Continue-As-New is the mechanism by which all relevant state is passed to a new Workflow Execution with a fresh Event History.

Learn more from within the WorkflowLink preview iconWhat is a Workflow?

In day-to-day conversations, the term "Workflow" frequently denotes either a Workflow Type, a Workflow Definition, or a Workflow Execution.

Learn more. The corresponding Event for this Command is one of the few Events that will be the last in a Workflow Execution Event History.

FailWorkflowExecution

This Command is triggered when the Workflow Execution returns an error or an exception is thrown.

  • Awaitable: No, a Workflow Execution can not await on the action resulting from this Command.
  • Corresponding Event: WorkflowExecutionFailed

CancelWorkflowExecution

This Command is triggered when the Workflow has successfully cleaned up after receiving a Cancellation Request (which will be present as WorkflowExecutionCancelRequestedEvent in the Event History). The Corresponding Event for this Command is one of the few Events that will be the last in a Workflow Execution Event History.

  • Awaitable: No, a Workflow Execution can not await on the action resulting from this Command.
  • Corresponding Event: WorkflowExecutionCanceled

StartChildWorkflowExecution

This Command is triggered by a call to spawn a Child Workflow ExecutionLink preview iconWhat is a Child Workflow Execution?

A Child Workflow Execution is a Workflow Execution that is spawned from within another Workflow.

Learn more.

By default, OSS users cannot have more than 50,000 pending Child Workflows.

SignalExternalWorkflowExecution

This Command is triggered by a call to SignalLink preview iconWhat is a Signal?

A Signal is an asynchronous request to a Workflow Execution.

Learn more another Workflow Execution.

By default, OSS users cannot have more than 50,000 pending Signals to other Workflows.

RequestCancelExternalWorkflowExecution

This Command is triggered by a call to request cancellation of another Workflow Execution.

By default, OSS users cannot have more than 50,000 pending Signals to other Workflows.

ScheduleActivityTask

This Command is triggered by a call to execute an ActivityLink preview iconWhat is an Activity?

In day-to-day conversation, the term "Activity" denotes an Activity Type, Activity Definition, or Activity Execution.

Learn more.

  • Awaitable: Yes, a Workflow Execution can await on the action resulting from this Command.
  • Corresponding Event: ActivityTaskScheduled

By default, OSS users cannot schedule more than 50,000 Activities.

RequestCancelActivityTask

This Command is triggered by a call to request the cancellation of an Activity TaskLink preview iconWhat is an Activity Task?

An Activity Task contains the context needed to make an Activity Task Execution.

Learn more.

  • Awaitable: No, a Workflow Execution can not await on the action resulting from this Command.
  • Corresponding Event: ActivityTaskCancelRequested

StartTimer

This Command is triggered by a call to start a Timer.

  • Awaitable: Yes, a Workflow Execution can await on the action resulting from this Command.
  • Corresponding Event: TimerStarted

CancelTimer

This Command is triggered by a call to cancel a Timer.

  • Awaitable: No, a Workflow Execution can not await on the action resulting from this Command.
  • Corresponding Event: TimerCanceled

RecordMarker

This Command is triggered by the SDK.

  • Awaitable: No, a Workflow Execution can not await on the action resulting from this Command.
  • Corresponding Event: MarkerRecorded

UpsertWorkflowSearchAttributes

This Command is triggered by a call to "upsert" Workflow Search AttributesLink preview iconWhat is a Search Attribute?

A Search Attribute is an indexed name used in List Filters to filter a list of Workflow Executions that have the Search Attribute in their metadata.

Learn more.