Until Successful Scope in Mule

Published on
March 12, 2021
Author
MuleSoft Integration Team
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

  1. Design a new flow and configure an HTTP listener for it.
  2. Create one more flow using the same HTTP Config but listening on a different path.
  3. From the first row, call the second flow using HTTP Requester.

  1. Wrap the HTTP requester under Until Successful Keep the default values for Max Retries and Milliseconds Between Retries.

until-successful-properties

  1. To test the flow, change the initial state of the second flow to stopped and run.
  2. 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

Data Extraction in Salesforce using Prompt Builder
BlogDec 4, 2025

Data Extraction in Salesforce using Prompt Builder

Introduction For the current digital ecosystem, data is an important aspect for decision-making. Yet, for many organizations, a significant portion of this valuable data remains locked away in unstructured formats. Organizations handle thousands of PDF documents daily — ranging from contracts and invoices to lab reports, quotations, and service agreements. Traditionally, extracting structured data from… Continue reading Data Extraction in Salesforce using Prompt Builder

Read More
Blog
6 min read

Data Extraction in Salesforce using Prompt Builder

Introduction For the current digital ecosystem, data is an important aspect for decision-making. Yet, for many organizations, a significant portion of this valuable data remains locked away in unstructured formats. Organizations handle thousands of PDF documents daily — ranging from contracts and invoices to lab reports, quotations, and service agreements. Traditionally, extracting structured data from… Continue reading Data Extraction in Salesforce using Prompt Builder

Read More
Compression Namespace in Apex: A Powerful New Salesforce Feature
BlogNov 5, 2025

Compression Namespace in Apex: A Powerful New Salesforce Feature

Introduction Working with documents inside Salesforce has always challenged developers because of the platform’s multitenant constraints. Previously, packaging and sending files in a compact form required external services, like an AWS Lambda function, that retrieved files via API and then compressed them. With the introduction of the Compression Namespace and the powerful pre-defined Apex functions,… Continue reading Compression Namespace in Apex: A Powerful New Salesforce Feature

Read More
Blog
5 min read

Compression Namespace in Apex: A Powerful New Salesforce Feature

Introduction Working with documents inside Salesforce has always challenged developers because of the platform’s multitenant constraints. Previously, packaging and sending files in a compact form required external services, like an AWS Lambda function, that retrieved files via API and then compressed them. With the introduction of the Compression Namespace and the powerful pre-defined Apex functions,… Continue reading Compression Namespace in Apex: A Powerful New Salesforce Feature

Read More
Boost LWC Performance with Debouncing
BlogSep 18, 2025

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

Read More
Blog
7 min read

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

Read More
Salesforce Pricing Automation: Boost Efficiency And Accuracy with Apex Triggers
BlogSep 9, 2025

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

Read More
Blog
6 min read

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

Read More