Skip to main content

Commands reference

A CommandLink preview icon

is a requested action issued by a WorkerLink preview icon to the Temporal ClusterLink preview icon after a Workflow Task ExecutionLink preview icon 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 ExecutionLink preview icon

is complete. The corresponding EventLink preview icon for this Command is one of the few Events that will be the last in a Workflow Execution Event HistoryLink preview icon.

  • 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 icon

from within the WorkflowLink preview icon. 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 icon

.

SignalExternalWorkflowExecution

This Command is triggered by a call to SignalLink preview icon

another Workflow Execution.

RequestCancelExternalWorkflowExecution

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

ScheduleActivityTask

This Command is triggered by a call to execute an ActivityLink preview icon

.

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

RequestCancelActivityTask

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

.

  • 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 icon

.