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.
Configuration
- 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.
<flow name="until-succesfullFlow" > <http:listener doc:name="Listener" config-ref="HTTP_Listener_config" path="/us"/> <until-successful maxRetries="5" doc:name="Until Successful" > <http:request method="GET" doc:name="Request" config-ref="HTTP_Request_configuration" path="/us-demo"/> </until-successful> <logger level="INFO" doc:name="Logger" message="Success"/> </flow> <flow name="until-succesfullFlow1" initialState="stopped"> <http:listener doc:name="Listener" config-ref="HTTP_Listener_config" path="/us2"/> <logger level="INFO" doc:name="Logger" message="US2 flow"/> </flow>
Variable Propagation
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.
Recent Blogs

Boost LWC Performance with Debouncing
Introduction Lightning Web Components (LWC) is a modern framework for building fast and dynamic user interfaces on the Salesforce platform. However, one common challenge in web development, including LWC, is efficiently handling user input, especially when dealing with rapid or repetitive events, such as typing in a search field. This is where debouncing becomes an… Continue reading Boost LWC Performance with Debouncing
Boost LWC Performance with Debouncing
Introduction Lightning Web Components (LWC) is a modern framework for building fast and dynamic user interfaces on the Salesforce platform. However, one common challenge in web development, including LWC, is efficiently handling user input, especially when dealing with rapid or repetitive events, such as typing in a search field. This is where debouncing becomes an… Continue reading Boost LWC Performance with Debouncing

Salesforce Pricing Automation: Boost Efficiency And Accuracy with Apex Triggers
Introduction In order to succeed in today’s fast-paced business landscape, precision and speed define competitive advantage. For businesses, especially those managing complex product catalogs, ensuring accurate pricing on sales orders or custom lines can be a time-consuming and error-prone task. To overcome this challenge, Salesforce trigger handlers offer a powerful solution to automate the entire… Continue reading Salesforce Pricing Automation: Boost Efficiency And Accuracy with Apex Triggers
Salesforce Pricing Automation: Boost Efficiency And Accuracy with Apex Triggers
Introduction In order to succeed in today’s fast-paced business landscape, precision and speed define competitive advantage. For businesses, especially those managing complex product catalogs, ensuring accurate pricing on sales orders or custom lines can be a time-consuming and error-prone task. To overcome this challenge, Salesforce trigger handlers offer a powerful solution to automate the entire… Continue reading Salesforce Pricing Automation: Boost Efficiency And Accuracy with Apex Triggers

Connecting MuleSoft and Azure SQL with Entra ID
Introduction Establishing a secure connection between MuleSoft and Azure SQL Database can be challenging, especially if you are using Entra ID (formerly known as Azure Active Directory) for authentication. This blog walks through a fully working configuration for connecting to Azure SQL using ActiveDirectoryServicePrincipal in Mule runtime 4.7.4 with Java 8 — addressing driver setup,… Continue reading Connecting MuleSoft and Azure SQL with Entra ID
Connecting MuleSoft and Azure SQL with Entra ID
Introduction Establishing a secure connection between MuleSoft and Azure SQL Database can be challenging, especially if you are using Entra ID (formerly known as Azure Active Directory) for authentication. This blog walks through a fully working configuration for connecting to Azure SQL using ActiveDirectoryServicePrincipal in Mule runtime 4.7.4 with Java 8 — addressing driver setup,… Continue reading Connecting MuleSoft and Azure SQL with Entra ID

Understanding Salesforce Flow Approval Processes
Introduction: Salesforce introduced Flow Approval Processes in the Spring '25 release. This is an evolved version of the classic approval process model, powered by Flow Orchestrator. The new approach brings unprecedented flexibility, enabling the creation of dynamic, multi-level, and logic-driven approval workflows that are entirely declarative. Continue reading the blog to get a deeper understanding… Continue reading Understanding Salesforce Flow Approval Processes
Understanding Salesforce Flow Approval Processes
Introduction: Salesforce introduced Flow Approval Processes in the Spring '25 release. This is an evolved version of the classic approval process model, powered by Flow Orchestrator. The new approach brings unprecedented flexibility, enabling the creation of dynamic, multi-level, and logic-driven approval workflows that are entirely declarative. Continue reading the blog to get a deeper understanding… Continue reading Understanding Salesforce Flow Approval Processes