Retry declares new retries in the steps of a path.
It's part of a set of components that work with subpipelines to execute their functions.
To work with this type of component, it's important to keep in mind:
- Subpipeline defined in the "onProcess" block: the pipeline defined in this block is deployed at each new retry.
- Subpipeline defined in the "onException" block: the pipeline defined in this block is deployed whenever a retry results in failure. More details below.
Take a look at the configuration parameters of the component:
- Maximum Number of Retries: the first retry also counts, so if the step fails in the first execution and you want a new retry to be made, the value of this parameter should be 2.
- Timeout Of The Whole Retry Operation: maximum lenght of each retry, including the first one (in milliseconds)
- Fail On Error: if the option is activated, the execution o f the Retry block that reaches the maximum number of retires or maximum lenght will finish the error and will be interrupted; otherwise, the pipeline execution continues, but the result will show a false value value for the success property
Any structure is accepted, since the process of a new retry goes through a subpipeline.
It's the output message of the last processed step.
Informaing success to a Retry block execution
The Retry block waits for a "success" property with the “true” value to be informed in the last step of the subpipeline for the execution to be considered successful. If an error occurs or the “success” property is informed with “false” value or empty, the Retry block will understand that a new retry must be executed.
When an error occurs during the processing of the subpipeline of the Retry block, the executing subpipeline will be invoked, if it's defined. In this subpipeline, it's possible to:
- have access to the details of the error that occurred during the processing of the last retry
- define if the Retry block continues with the retries, informing a “success” property with the “false” value. If a “success” property is specified with the “true” value, then the Retry block will be successfully finished and no other retry will be executed.
If an error component, such as Throw Error or Assert, is used inside the execution pipeline or if an error occurs, then the Retry block will be finished and the error will be propagated to the pipeline.