Until Successful Scope in Mule
“Until Successful” is the scope for executing a set of components as one unit.
It processes all the components within it until they produce a successful result. If one processor within the scope fails, it retries the enclosed processors again. The number of retries is configurable and decided by the user.
- Design a new flow and configure an HTTP listener for it.
- Create one more flow using the same HTTP Config but listening on a different path.
- From the first row, call the second flow using HTTP Requester.
- Wrap the HTTP requester under Until Successful Keep the default values for Max Retries and Milliseconds Between Retries.
- To test the flow, change the initial state of the second flow to stopped and run.
- The requester will fail, and the scope will retry five times before throwing the error.
New variables created within the scope are not available for the subsequent execution, and any modifications to variables created outside the scope are not available to the subsequent execution. Each execution cycle starts with a fresh set of variables.
Thanks for reading. Find more MuleSoft Best practices at Caelius Consulting Resource Centre.