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

Designing for Reality: Integrating 837 Claims When X12 Meets Production
BlogFeb 11, 2026

Designing for Reality: Integrating 837 Claims When X12 Meets Production

Designing 837 Claim Integration for Real-World Healthcare Systems When it comes to 837 claim integration, most architects assume the X12 specification guarantees predictability. On paper, the 837 Professional, Institutional, and Dental transactions look clean and orderly. In production? Not even close. Real-world 837 files behave differently across trading partners. Loops appear conditionally. Repeatable segments shift… Continue reading Designing for Reality: Integrating 837 Claims When X12 Meets Production

Read More
Blog
5 min read

Designing for Reality: Integrating 837 Claims When X12 Meets Production

Designing 837 Claim Integration for Real-World Healthcare Systems When it comes to 837 claim integration, most architects assume the X12 specification guarantees predictability. On paper, the 837 Professional, Institutional, and Dental transactions look clean and orderly. In production? Not even close. Real-world 837 files behave differently across trading partners. Loops appear conditionally. Repeatable segments shift… Continue reading Designing for Reality: Integrating 837 Claims When X12 Meets Production

Read More
AI-Driven PDF Parsing in Salesforce
BlogDec 4, 2025

AI-Driven PDF Parsing in Salesforce

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 AI-Driven PDF Parsing in Salesforce

Read More
Blog
6 min read

AI-Driven PDF Parsing in Salesforce

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 AI-Driven PDF Parsing in Salesforce

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