Commands reference
A Command What is a Command? A Command is a requested action issued by a Worker to the Temporal Cluster after a Workflow Task Execution completes. What 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. What is a Temporal Cluster? A Temporal Cluster is the Temporal Server paired with persistence. What is a Workflow Task Execution? A Workflow Task Execution is when a Worker picks up a Workflow Task and uses it to make progress on the execution of a Workflow function.
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 What is a Workflow Execution? A Temporal Workflow Execution is a durable, scalable, reliable, and reactive function execution. It is the main unit of execution of a Temporal Application. What is an Event? Events are created by the Temporal Cluster in response to external occurrences and Commands generated by a Workflow Execution. What is an Event History? An append log of Events that represents the full state a Workflow Execution.
- 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-New What 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. What is a Workflow? In day-to-day conversations, the term "Workflow" frequently denotes either a Workflow Type, a Workflow Definition, or a Workflow Execution.
- Awaitable: No, a Workflow Execution can not await on the action resulting from this Command.
- Corresponding Event: WorkflowExecutionContinuedAsNew
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 Execution What is a Child Workflow Execution? A Child Workflow Execution is a Workflow Execution that is spawned from within another Workflow.
- Awaitable: Yes, a Workflow Execution can await on the action resulting from this Command.
- Corresponding Event: ChildWorkflowExecutionStarted
SignalExternalWorkflowExecution
This Command is triggered by a call to Signal another Workflow Execution.
- Awaitable: Yes, a Workflow Execution can await on the action resulting from this Command.
- Corresponding Event: SignalExternalWorkflowExecutionInitiated
RequestCancelExternalWorkflowExecution
This Command is triggered by a call to request cancellation of another Workflow Execution.
- Awaitable: Yes, a Workflow Execution can await on the action resulting from this Command.
- Corresponding Event: RequestCancelExternalWorkflowExecutionInitiated
ScheduleActivityTask
This Command is triggered by a call to execute an Activity What is an Activity? In day-to-day conversations, the term "Activity" frequently denotes either an Activity Type, an Activity Definition, or an Activity Execution.
- 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 Task What is an Activity Task? An Activity Task contains the context needed to make an Activity Task Execution.
- 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 Attributes What 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.
- Awaitable: No, a Workflow Execution can not await on the action resulting from this Command.
- Corresponding Event: UpsertWorkflowSearchAttributes