Temporal CLI workflow command reference
Workflow 🔗
cancel
The temporal workflow cancel
command cancels a Workflow Execution 🔗
Canceling a running Workflow Execution records a WorkflowExecutionCancelRequested
event 🔗
temporal workflow cancel --workflow-id=meaningful-business-id
In addition to Workflow IDs, Workflows can also be Signaled 🔗
temporal workflow cancel --query=MyQuery
Use the options listed below to change the behavior of this command.
--fields 🔗
xLink previewtemporal fieldsCustomize fields to print.--limit 🔗
xLink previewtemporal limitNumber of items to print.- xLink previewtemporal no-pagerDisables the interactive pager.
--output 🔗
xLink previewtemporal outputOutput format.--pager 🔗
xLink previewtemporal pagerSets the pager for Temporal CLI to use.--query 🔗
xLink previewtemporal queryVisibility Query of Search Attributes describing the Workflow Executions to reset.--reason 🔗
xLink previewtemporal reasonReason for the operation--run-id 🔗
xLink previewtemporal run-idIdentifies the current Workflow Run.- xLink previewtemporal time-formatFormat time as either relative, iso, raw.
- xLink previewtemporal workflow-idWorkflow Id
--yes 🔗
xLink previewtemporal yesConfirm all prompts.
count
The temporal workflow count
command returns a count of Workflow Executions 🔗
Use the options listed below to change the command's behavior.
--fields 🔗
xLink previewtemporal fieldsCustomize fields to print.--limit 🔗
xLink previewtemporal limitNumber of items to print.- xLink previewtemporal no-pagerDisables the interactive pager.
--output 🔗
xLink previewtemporal outputOutput format.--pager 🔗
xLink previewtemporal pagerSets the pager for Temporal CLI to use.--query 🔗
xLink previewtemporal queryVisibility Query of Search Attributes describing the Workflow Executions to reset.- xLink previewtemporal time-formatFormat time as either relative, iso, raw.
delete
The temporal workflow delete
command deletes the specified Workflow Execution 🔗
Use the options listed below to change the command's behavior.
--fields 🔗
xLink previewtemporal fieldsCustomize fields to print.--limit 🔗
xLink previewtemporal limitNumber of items to print.- xLink previewtemporal no-pagerDisables the interactive pager.
--output 🔗
xLink previewtemporal outputOutput format.--pager 🔗
xLink previewtemporal pagerSets the pager for Temporal CLI to use.--run-id 🔗
xLink previewtemporal run-idIdentifies the current Workflow Run.- xLink previewtemporal time-formatFormat time as either relative, iso, raw.
- xLink previewtemporal workflow-idWorkflow Id
describe
The temporal workflow describe
command shows information about a given Workflow Execution 🔗
temporal workflow describe --workflow-id=meaningful-business-id
The output of this command can be changed to show as printed ('raw') or to only show the Workflow Execution's auto-reset points.
temporal workflow describe --workflow-id=meaningful-business-id --raw=true --reset-points=true
Use the command options listed below to change the information returned by this command.
--fields 🔗
xLink previewtemporal fieldsCustomize fields to print.--limit 🔗
xLink previewtemporal limitNumber of items to print.- xLink previewtemporal no-pagerDisables the interactive pager.
--output 🔗
xLink previewtemporal outputOutput format.--pager 🔗
xLink previewtemporal pagerSets the pager for Temporal CLI to use.--raw 🔗
xLink previewtemporal rawPrint raw data as json (prefer this over -o json for scripting).- xLink previewtemporal reset-pointsOnly show Workflow Events that are eligible for reset.
--run-id 🔗
xLink previewtemporal run-idIdentifies the current Workflow Run.- xLink previewtemporal time-formatFormat time as either relative, iso, raw.
- xLink previewtemporal workflow-idWorkflow Id
execute
The temporal workflow execute
command starts a new Workflow Execution 🔗
To execute a Workflow 🔗
temporal workflow execute --workflow-id=meaningful-business-id --type=MyWorkflow --task-queue=MyTaskQueue
Single quotes('') are used to wrap input as JSON.
temporal workflow execute --workflow-id=meaningful-business-id --type-MyWorkflow --task-queue-MyTaskQueue --input='{"JSON": "Input"}'
Use the command options listed below to change how the Workflow Execution behaves during its run.
--cron 🔗
xLink previewtemporal cronOptional Cron Schedule for the Workflow.- xLink previewtemporal execution-timeoutTimeout (in seconds) for a Workflow Execution, including retries and continue-as-new tasks.
--fields 🔗
xLink previewtemporal fieldsCustomize fields to print.- xLink previewtemporal id-reuse-policyAllows the same Workflow Id to be used in a new Workflow Execution.
--input 🔗
xLink previewtemporal inputOptional JSON input to provide to the Workflow.- xLink previewtemporal input-filePasses optional input for the Workflow from a JSON file.
--limit 🔗
xLink previewtemporal limitNumber of items to print.- xLink previewtemporal max-field-lengthMaximum length for each attribute field.
--memo 🔗
xLink previewtemporal memoSet a memo on a schedule (in key=value format).- xLink previewtemporal memo-fileSet a memo from a file.
- xLink previewtemporal no-pagerDisables the interactive pager.
--output 🔗
xLink previewtemporal outputOutput format.--pager 🔗
xLink previewtemporal pagerSets the pager for Temporal CLI to use.- xLink previewtemporal run-timeoutTimeout (in seconds) of a single Workflow run.
- xLink previewtemporal search-attributeSet Search Attribute on a schedule.
- xLink previewtemporal task-queueTask Queue
- xLink previewtemporal task-timeoutStart-to-close timeout for a Workflow Task (in seconds).
- xLink previewtemporal time-formatFormat time as either relative, iso, raw.
--type 🔗
xLink previewtemporal typeSearch attribute type.- xLink previewtemporal workflow-idWorkflow Id
list
The temporal workflow list
command provides a list of Workflow Executions 🔗
temporal workflow list --query=MyQuery
The command can also return a list of archived Workflow Executions.
temporal workflow list --archived=true
Use the command options listed below to change the information returned by this command.
- xLink previewtemporal archivedList archived Workflow Executions.
--fields 🔗
xLink previewtemporal fieldsCustomize fields to print.--limit 🔗
xLink previewtemporal limitNumber of items to print.- xLink previewtemporal no-pagerDisables the interactive pager.
--output 🔗
xLink previewtemporal outputOutput format.--pager 🔗
xLink previewtemporal pagerSets the pager for Temporal CLI to use.--query 🔗
xLink previewtemporal queryVisibility Query of Search Attributes describing the Workflow Executions to reset.- xLink previewtemporal time-formatFormat time as either relative, iso, raw.
query
The temporal workflow query
command sends a Query 🔗
Queries can retrieve all or part of the Workflow state within given parameters. Queries can also be used on completed Workflows 🔗
temporal workflow query --workflow-id=meaningful-business-id --type=MyQueryType
Use the command options listed below to change the information returned by this command.
--fields 🔗
xLink previewtemporal fieldsCustomize fields to print.--input 🔗
xLink previewtemporal inputOptional JSON input to provide to the Workflow.- xLink previewtemporal input-filePasses optional input for the Workflow from a JSON file.
--limit 🔗
xLink previewtemporal limitNumber of items to print.- xLink previewtemporal no-pagerDisables the interactive pager.
--output 🔗
xLink previewtemporal outputOutput format.--pager 🔗
xLink previewtemporal pagerSets the pager for Temporal CLI to use.- xLink previewtemporal reject-conditionOptional flag for rejecting Queries based on Workflow state.
--run-id 🔗
xLink previewtemporal run-idIdentifies the current Workflow Run.- xLink previewtemporal time-formatFormat time as either relative, iso, raw.
--type 🔗
xLink previewtemporal typeSearch attribute type.- xLink previewtemporal workflow-idWorkflow Id
reset
The temporal workflow reset
command resets a Workflow Execution 🔗
The Workflow Execution can be set to a given Event Type 🔗
temporal workflow reset --workflow-id=meaningful-business-id --type=LastContinuedAsNew
Alternatively, the Workflow Execution can be reset to any Event after WorkflowTaskStarted.
temporal workflow reset --workflow-id=meaningful-business-id --event-id=MyLastEvent
Use the options listed below to change reset behavior.
- xLink previewtemporal event-idThe Event Id for any Event after WorkflowTaskStarted you want to reset to (exclusive).
--fields 🔗
xLink previewtemporal fieldsCustomize fields to print.--limit 🔗
xLink previewtemporal limitNumber of items to print.- xLink previewtemporal no-pagerDisables the interactive pager.
--output 🔗
xLink previewtemporal outputOutput format.--pager 🔗
xLink previewtemporal pagerSets the pager for Temporal CLI to use.- xLink previewtemporal reapply-typeEvent types to reapply after the reset point.
--reason 🔗
xLink previewtemporal reasonReason for the operation--run-id 🔗
xLink previewtemporal run-idIdentifies the current Workflow Run.- xLink previewtemporal time-formatFormat time as either relative, iso, raw.
--type 🔗
xLink previewtemporal typeSearch attribute type.- xLink previewtemporal workflow-idWorkflow Id
reset-batch
The temporal workflow reset-batch
command resets a batch of Workflow Executions 🔗
resetType
.
Resetting a Workflow 🔗The set of Workflow Executions to reset can be specified in an input file. The input file must have a Workflow ID 🔗
temporal workflow reset-batch --input-file=MyInput --input-separator="\t"
Workflow Executions can also be found by Query 🔗
Use the options listed below to change reset behavior.
- xLink previewtemporal dry-runSimulate reset without resetting any Workflow Executions.
- xLink previewtemporal exclude-fileInput file that specifies Workflow Executions to exclude from resetting.
--fields 🔗
xLink previewtemporal fieldsCustomize fields to print.- xLink previewtemporal input-filePasses optional input for the Workflow from a JSON file.
- xLink previewtemporal input-parallelismNumber of goroutines to run in parallel.
- xLink previewtemporal input-separatorSeparator for the input file.
--limit 🔗
xLink previewtemporal limitNumber of items to print.- xLink previewtemporal no-pagerDisables the interactive pager.
- xLink previewtemporal non-deterministicReset Workflow Execution only if its last Event is WorkflowTaskFailed with a nondeterministic error.
--output 🔗
xLink previewtemporal outputOutput format.--pager 🔗
xLink previewtemporal pagerSets the pager for Temporal CLI to use.--query 🔗
xLink previewtemporal queryVisibility Query of Search Attributes describing the Workflow Executions to reset.--reason 🔗
xLink previewtemporal reasonReason for the operation- xLink previewtemporal skip-base-is-not-currentSkip a Workflow Execution if the base Run is not the current Run.
- xLink previewtemporal skip-current-openSkip a Workflow Execution if the current Run is open for the same Workflow Id as the base Run.
- xLink previewtemporal time-formatFormat time as either relative, iso, raw.
--type 🔗
xLink previewtemporal typeSearch attribute type.
show
The temporal workflow show
command provides the Event History 🔗
Use the options listed below to change the command's behavior.
--fields 🔗
xLink previewtemporal fieldsCustomize fields to print.--follow 🔗
xLink previewtemporal followFollow the progress of a Workflow Execution.--limit 🔗
xLink previewtemporal limitNumber of items to print.- xLink previewtemporal max-field-lengthMaximum length for each attribute field.
- xLink previewtemporal no-pagerDisables the interactive pager.
--output 🔗
xLink previewtemporal outputOutput format.- xLink previewtemporal output-filenameSerializes Event History to a file.
--pager 🔗
xLink previewtemporal pagerSets the pager for Temporal CLI to use.- xLink previewtemporal reset-pointsOnly show Workflow Events that are eligible for reset.
--run-id 🔗
xLink previewtemporal run-idIdentifies the current Workflow Run.- xLink previewtemporal time-formatFormat time as either relative, iso, raw.
- xLink previewtemporal workflow-idWorkflow Id
signal
The temporal workflow signal
command is used to Signal 🔗
Use the options listed below to change the command's behavior.
--fields 🔗
xLink previewtemporal fieldsCustomize fields to print.--input 🔗
xLink previewtemporal inputOptional JSON input to provide to the Workflow.- xLink previewtemporal input-filePasses optional input for the Workflow from a JSON file.
--limit 🔗
xLink previewtemporal limitNumber of items to print.--name 🔗
xLink previewtemporal nameFrontend address of the remote Cluster.- xLink previewtemporal no-pagerDisables the interactive pager.
--output 🔗
xLink previewtemporal outputOutput format.--pager 🔗
xLink previewtemporal pagerSets the pager for Temporal CLI to use.--query 🔗
xLink previewtemporal queryVisibility Query of Search Attributes describing the Workflow Executions to reset.--reason 🔗
xLink previewtemporal reasonReason for the operation--run-id 🔗
xLink previewtemporal run-idIdentifies the current Workflow Run.- xLink previewtemporal time-formatFormat time as either relative, iso, raw.
- xLink previewtemporal workflow-idWorkflow Id
--yes 🔗
xLink previewtemporal yesConfirm all prompts.
stack
The temporal workflow stack
command queries a Workflow Execution 🔗
--stack-trace
as the Query 🔗Use the options listed below to change the command's behavior.
--fields 🔗
xLink previewtemporal fieldsCustomize fields to print.--input 🔗
xLink previewtemporal inputOptional JSON input to provide to the Workflow.- xLink previewtemporal input-filePasses optional input for the Workflow from a JSON file.
--limit 🔗
xLink previewtemporal limitNumber of items to print.- xLink previewtemporal no-pagerDisables the interactive pager.
--output 🔗
xLink previewtemporal outputOutput format.--pager 🔗
xLink previewtemporal pagerSets the pager for Temporal CLI to use.- xLink previewtemporal reject-conditionOptional flag for rejecting Queries based on Workflow state.
--run-id 🔗
xLink previewtemporal run-idIdentifies the current Workflow Run.- xLink previewtemporal time-formatFormat time as either relative, iso, raw.
- xLink previewtemporal workflow-idWorkflow Id
start
The temporal workflow start
command starts a new Workflow Execution 🔗
temporal workflow start --task-queue=MyTaskQueue --type=MyWorkflow
Use the command options listed below to change how the Workflow Execution behaves upon starting.
--cron 🔗
xLink previewtemporal cronOptional Cron Schedule for the Workflow.- xLink previewtemporal execution-timeoutTimeout (in seconds) for a Workflow Execution, including retries and continue-as-new tasks.
--fields 🔗
xLink previewtemporal fieldsCustomize fields to print.- xLink previewtemporal id-reuse-policyAllows the same Workflow Id to be used in a new Workflow Execution.
--input 🔗
xLink previewtemporal inputOptional JSON input to provide to the Workflow.- xLink previewtemporal input-filePasses optional input for the Workflow from a JSON file.
--limit 🔗
xLink previewtemporal limitNumber of items to print.- xLink previewtemporal max-field-lengthMaximum length for each attribute field.
--memo 🔗
xLink previewtemporal memoSet a memo on a schedule (in key=value format).- xLink previewtemporal memo-fileSet a memo from a file.
- xLink previewtemporal no-pagerDisables the interactive pager.
--output 🔗
xLink previewtemporal outputOutput format.--pager 🔗
xLink previewtemporal pagerSets the pager for Temporal CLI to use.- xLink previewtemporal run-timeoutTimeout (in seconds) of a single Workflow run.
- xLink previewtemporal search-attributeSet Search Attribute on a schedule.
- xLink previewtemporal task-queueTask Queue
- xLink previewtemporal task-timeoutStart-to-close timeout for a Workflow Task (in seconds).
- xLink previewtemporal time-formatFormat time as either relative, iso, raw.
--type 🔗
xLink previewtemporal typeSearch attribute type.- xLink previewtemporal workflow-idWorkflow Id
terminate
The temporal workflow terminate
command terminates a Workflow Execution 🔗
Terminating a running Workflow Execution records a WorkflowExecutionTerminated
event 🔗
Workflow terminations require a valid Workflow ID 🔗
temporal workflow terminate --workflow-id=meaningful-business-id
Use the options listed below to change termination behavior.
--fields 🔗
xLink previewtemporal fieldsCustomize fields to print.--limit 🔗
xLink previewtemporal limitNumber of items to print.- xLink previewtemporal no-pagerDisables the interactive pager.
--output 🔗
xLink previewtemporal outputOutput format.--pager 🔗
xLink previewtemporal pagerSets the pager for Temporal CLI to use.--query 🔗
xLink previewtemporal queryVisibility Query of Search Attributes describing the Workflow Executions to reset.--reason 🔗
xLink previewtemporal reasonReason for the operation--run-id 🔗
xLink previewtemporal run-idIdentifies the current Workflow Run.- xLink previewtemporal time-formatFormat time as either relative, iso, raw.
- xLink previewtemporal workflow-idWorkflow Id
--yes 🔗
xLink previewtemporal yesConfirm all prompts.
trace
The temporal workflow trace
command tracks the progress of a Workflow Execution 🔗
Use the options listed below to change the command's behavior.
- xLink previewtemporal concurrencyRequest concurrency.
--depth 🔗
xLink previewtemporal depthNumber of Child Workflows to expand.--fields 🔗
xLink previewtemporal fieldsCustomize fields to print.--fold 🔗
xLink previewtemporal foldStatuses for which Child Workflows will be folded in (this will reduce the number of information fetched and displayed).--limit 🔗
xLink previewtemporal limitNumber of items to print.- xLink previewtemporal no-foldDisable folding
- xLink previewtemporal no-pagerDisables the interactive pager.
--output 🔗
xLink previewtemporal outputOutput format.--pager 🔗
xLink previewtemporal pagerSets the pager for Temporal CLI to use.--run-id 🔗
xLink previewtemporal run-idIdentifies the current Workflow Run.- xLink previewtemporal time-formatFormat time as either relative, iso, raw.
- xLink previewtemporal workflow-idWorkflow Id