Activity commands
Activity commands operate on Activity Executions.
Activity commands follow this syntax:
temporal activity [command] [command options]
complete
The temporal activity complete
command completes an Activity Execution.
Along with completing the Activity, the result given upon return can be set as well.
temporal activity complete --activity-id=MyActivity --result=ActivityComplete
Use the following options to change the behavior of this command.
fail
The temporal activity fail
command fails an Activity Execution.
The Activity must already be running on a valid Workflow.
temporal fail --workflow-id=meaningful-business-id --activity-id=MyActivity
Use the following options to change the behavior of this command.
update-options
The temporal activity update-options
command updates options for an Activity Execution.
The Activity must already be running on a valid Workflow.
Updates are incremental, only changing the specified options. Either activity id or activity type must be provided.
If type is provided, and there are multiple pending activities of the provided type - all of them will be updated.
Command will return new activity options.
Use the following options to change the behavior of this command.
Routing options:
Update specific options:
- --task-queue
- --schedule-to-close-timeout
- --schedule-to-start-timeout
- --start-to-close-timeout
- --heartbeat-timeout
- --retry-initial-interval
- --retry-maximum-interval
- --retry-backoff-coefficient
- --retry-maximum-attempts
Other options:
- --identity
- --tls
- --tls-ca-path
- --tls-cert-path
- --tls-disable-host-verification
- --tls-key-path
- --tls-server-name
- --address
- --codec-auth
- --codec-endpoint
- --color
- --command-timeout
- --detail
- --env
- --grpc-meta
pause
The temporal activity pause
command pauses an Activity Execution specified by its ID or type.
If type is provided, and there are multiple pending activities of the provided type - all of them will be paused.
Pausing an activity means:
- If the activity is currently waiting for a retry or is running and subsequently fails, it will not be rescheduled until it is unpaused.
- If the activity is already paused, calling this method will have no effect.
- If the activity is running and finishes successfully, the activity will be completed.
- If the activity is running and finishes with failure:
- if there is no retry left - the activity will be completed.
- if there are more retries left - the activity will be paused. For long-running activities, activities in paused state will send a cancellation with "activity_paused" set to 'true' in response to 'RecordActivityTaskHeartbeat'. The activity should respond to the cancellation accordingly.
This command returns a NotFound
error if there is no pending activity with the provided ID or type.
Use the following options to change the behavior of this command.
Routing options:
Other options:
- --identity
- --tls
- --tls-ca-path
- --tls-cert-path
- --tls-disable-host-verification
- --tls-key-path
- --tls-server-name
- --address
- --codec-auth
- --codec-endpoint
- --color
- --command-timeout
- --detail
- --env
- --grpc-meta
unpause
The temporal activity unpause
command unpauses an Activity Execution specified by its ID or type.
If there are multiple pending activities of the provided type - all of them will be unpaused.
If activity is not paused, this call will have no effect.
If the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag).
Once the activity is unpaused, all timeout timers will be regenerated.
Command will fail with a NotFound
error if there is no pending activity with the provided ID or type.
Activities can be unpaused in bulk via a visibility Query list filter:
temporal activity unpause --query YourQuery \
--reason YourReasonForUnpause
Routing options:
Unpause specific options:
Other options:
- --identity
- --tls
- --tls-ca-path
- --tls-cert-path
- --tls-disable-host-verification
- --tls-key-path
- --tls-server-name
- --address
- --codec-auth
- --codec-endpoint
- --color
- --command-timeout
- --detail
- --env
- --grpc-meta
reset
The temporal activity reset
command resets an Activity Execution specified by its ID or type.
If there are multiple pending activities of the provided type - all of them will be reset.
Resetting an activity means:
- number of attempts will be reset to 0.
- activity timeouts will be reset.
- if the activity is waiting for retry, and it is not paused or 'keep_paused' is not provided, it will be scheduled immediately (* see 'jitter' flag),
Command will fail with a NotFound
error if there is no pending activity with the provided ID or type.
Routing options:
Reset specific options:
Other options: