Based on a reply here: Configure Timeout for ssh command
Sometimes, data integrations can be unstable due to poor configuration, network issues, or system overloads. The remedy can be simple - just to re-run the workflow again. But how to re-try an operation in an EasyMorph workflow?
Here is an example that demonstrates a retry technique. It has three modules:
One module emulates a finicky operation by generating a random number between 1 and 4 and failing if the number is not 1. In other words, it runs successfully only one time out of four.
The second module module is an error catcher. Its purpose is to run the "problematic" module and collect errors. It also controls the number of retry attempts.
Finally, the main module is the starting point of the workflow. It contains the "Repeat" action that actually creates a loop.
The example has two implementations. The simpler one doesn't limit the number of retries. It simply keeps repeating the operation until it succeeds.
The other one is a bit more complex as it controls the number of retry attempts, and it fails if that number is exceeded.
repeat-retry.morph (9.6 KB)