Overview
The Retry is a fundamental concept in the Serverless Workflow DSL, used to define the strategy for retrying a failed task when an error is encountered during execution. This policy provides developers with fine-grained control over how and when to retry failed tasks, enabling robust error handling and fault tolerance within workflows.Retry Policy
A runtime expression used to determine whether or not to retry running the task, in a given context.
A runtime expression used to determine whether or not to retry running the task, in a given context.
The duration, if any, to wait between retry attempts.
The limits, if any, to impose to the retry policy.
The backoff strategy to use, if any.
The parameters, if any, that control the randomness or variability of the delay between retry attempts.
Retry Limit
The definition of retry limits.The maximum attempts count.
The duration limit, if any, for all retry attempts.
The maximum duration, if any, during which to retry a given task.
Backoff Strategies
The definition of a retry backoff strategy.The definition of the constant backoff to use, if any.Required if
exponential and linear are not set, otherwise ignored.The definition of the exponential backoff to use, if any.Required if
constant and linear are not set, otherwise ignored.The definition of the linear backoff to use, if any.Required if
constant and exponential are not set, otherwise ignored.Jitter
Represents the definition of the parameters that control the randomness or variability of a delay, typically between retry attempts.The minimum duration of the jitter range.
The maximum duration of the jitter range.
Examples
Exponential Backoff with Retry Limit
Retry with Jitter
Linear Backoff
Constant Backoff with Duration Limit
Conditional Retry
Retry with Exception Condition
Reusable Retry Policies
You can define retry policies in the workflow’s reusable components and reference them by name:Duration Format
Durations can be defined through properties or with an ISO 8601 string:Using Properties
Using ISO 8601 String
Duration Properties
Number of days, if any.
Number of hours, if any.
Number of minutes, if any.
Number of seconds, if any.
Number of milliseconds, if any.