SlideShare a Scribd company logo
How to use Until Successful
Component
28-09-2014
Abstract
• The main motto of this PPT is how to use Until
Successful component in our applications.
Introduction
• The until-successful scope processes
messages through the processors within it
until the process succeeds. By default, until-
successful’s processing occurs asynchronously
from the main flow. After passing a message
into the until-successful scope, the main flow
immediately regains control of the thread.
However, you can configure until-successful to
run synchronously relative to the main flow.
Example
• .mflow• <?xml version="1.0" encoding="UTF-8"?>
• <mule xmlns:vm="http://www.mulesoft.org/schema/mule/vm" xmlns:jdbc-ee="http://www.mulesoft.org/schema/mule/ee/jdbc"
xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
• http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
• http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
• http://www.mulesoft.org/schema/mule/ee/jdbc http://www.mulesoft.org/schema/mule/ee/jdbc/current/mule-jdbc-ee.xsd
• http://www.mulesoft.org/schema/mule/vm http://www.mulesoft.org/schema/mule/vm/current/mule-vm.xsd">
• <jdbc-ee:mssql-data-source name="MS_SQL_Data_Source" user=“****" password=“****" url="jdbc:sqlserver://localhost;databaseName=test1" transactionIsolation="UNSPECIFIED"
doc:name="MS SQL Data Source"/>
• <jdbc-ee:connector name="Database" dataSource-ref="MS_SQL_Data_Source" validateConnections="true" queryTimeout="-1" pollingFrequency="0" doc:name="Database"/>
• <spring:beans>
• <spring:bean id="Bean" name="Bean" class="org.mule.util.store.SimpleMemoryObjectStore"/>
• </spring:beans>
• <flow name="Database_ComponentFlow2" doc:name="Database_ComponentFlow2">
• <http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8087" path="UntilSuccessful" doc:name="HTTP"/>
• <logger message="--main flow--" level="INFO" doc:name="Logger"/>
• <expression-component doc:name="Expression"><![CDATA[
• sessionVars['DB_STATUS']='INITIAL';
• ]]></expression-component>
• <until-successful objectStore-ref="Bean" maxRetries="5" secondsBetweenRetries="5" doc:name="Until Successful" failureExpression="#[sessionVars['DB_STATUS']!='SUCCESS']">
• <vm:outbound-endpoint exchange-pattern="request-response" path="db" doc:name="VM"/>
• </until-successful>
• </flow>
• <flow name="Database_ComponentFlow3" doc:name="Database_ComponentFlow3">
• <vm:inbound-endpoint exchange-pattern="request-response" path="db" doc:name="VM"/>
• <jdbc-ee:outbound-endpoint exchange-pattern="request-response" queryKey="select" queryTimeout="-1" connector-ref="Database" doc:name="Database">
• <jdbc-ee:query key="select" value="select * from mytable1"/>
• </jdbc-ee:outbound-endpoint>
• <expression-component doc:name="Expression"><![CDATA[
• sessionVars['DB_STATUS']='SUCCESS';
• ]]></expression-component>
• <logger message="--success" level="INFO" doc:name="Logger"/>
• </flow>
• </mule>
• Output:
• Flow of execution:
1. URL to trigger the service from browser
http://localhost:8087/UntilSuccessful
2. Database component connects to the specific
database, executes the select query but there is
no table specified in DB, hence the until
successful component retries for 5 times and
exit the flow.
References
• https://docs.mulesoft.com/mule-user-
guide/v/3.5/until-successful-scope

More Related Content

PPTX
Until Successful Component
PPTX
Until successful component in mule
PPTX
Expression filter in Mule
PPTX
Using XSLT in Mule
PPT
Simple VM in Mule
PPTX
Choice component in mule demo
PPTX
How to use smtp endpoint
PPTX
Message properties component in mule demo
Until Successful Component
Until successful component in mule
Expression filter in Mule
Using XSLT in Mule
Simple VM in Mule
Choice component in mule demo
How to use smtp endpoint
Message properties component in mule demo

What's hot (17)

PPTX
How to use splitter component
PPTX
Mule Message Properties Component
PPTX
Expression filter in Mule
ODP
Howtouseforeachcomponent
PPTX
Vm component in mule
PPTX
Message properties component in mule
PPTX
Xslt in mule
PPTX
File component in mule demo
PPTX
How to use processor chain
PPTX
For each component in mule
PPTX
Mule message processor or routers
PPTX
Mule esb
PPTX
Choice component in mule
PPTX
xslt in mule
PPTX
Mule servlet connector
PPTX
Quartz component in mule demo
PPTX
Basic example using for each component
How to use splitter component
Mule Message Properties Component
Expression filter in Mule
Howtouseforeachcomponent
Vm component in mule
Message properties component in mule
Xslt in mule
File component in mule demo
How to use processor chain
For each component in mule
Mule message processor or routers
Mule esb
Choice component in mule
xslt in mule
Mule servlet connector
Quartz component in mule demo
Basic example using for each component
Ad

Viewers also liked (10)

PPTX
How to use quartz component
PPTX
Top 5 it director cover letter samples
PPT
Coseri Tatiana - CONTRIBUȚIA ACTIVELOR INTANGIBILE LA SINERGIA INSTITUȚIONALĂ
PPTX
PBS India
PPTX
Rog domingo, mystery trip 2015
PDF
Zaštita od sunca
PPTX
Trouble shooting issues - Case study
PPTX
PDF
Modelos de e-business
PDF
Final Project Report
How to use quartz component
Top 5 it director cover letter samples
Coseri Tatiana - CONTRIBUȚIA ACTIVELOR INTANGIBILE LA SINERGIA INSTITUȚIONALĂ
PBS India
Rog domingo, mystery trip 2015
Zaštita od sunca
Trouble shooting issues - Case study
Modelos de e-business
Final Project Report
Ad

Similar to How to use until successful component (16)

PPTX
Until successful component in mule
 
PPTX
Until successful component
PPTX
Until successful component in mule demo
PPTX
Basic example using until successful component
PPTX
Until successful scope in mule
PDF
Until Successful Scope With Mule ESB
PPT
MuleSoft ESB Routes first-successful
PPTX
Mule- File component example
PPTX
How to use file component
PPTX
Mule scopes 2
PPTX
Scopes in mule
PPTX
File component
 
PPTX
Mule File component
PPTX
File component
PPTX
File component in mule
PPTX
File component in mule
Until successful component in mule
 
Until successful component
Until successful component in mule demo
Basic example using until successful component
Until successful scope in mule
Until Successful Scope With Mule ESB
MuleSoft ESB Routes first-successful
Mule- File component example
How to use file component
Mule scopes 2
Scopes in mule
File component
 
Mule File component
File component
File component in mule
File component in mule

Recently uploaded (20)

PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
Complications of Minimal Access Surgery at WLH
PDF
VCE English Exam - Section C Student Revision Booklet
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
TR - Agricultural Crops Production NC III.pdf
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PPTX
Cell Structure & Organelles in detailed.
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PPTX
Institutional Correction lecture only . . .
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
RMMM.pdf make it easy to upload and study
PDF
Basic Mud Logging Guide for educational purpose
PPTX
Lesson notes of climatology university.
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Module 4: Burden of Disease Tutorial Slides S2 2025
Complications of Minimal Access Surgery at WLH
VCE English Exam - Section C Student Revision Booklet
Final Presentation General Medicine 03-08-2024.pptx
TR - Agricultural Crops Production NC III.pdf
STATICS OF THE RIGID BODIES Hibbelers.pdf
FourierSeries-QuestionsWithAnswers(Part-A).pdf
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Cell Structure & Organelles in detailed.
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Institutional Correction lecture only . . .
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
O7-L3 Supply Chain Operations - ICLT Program
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
human mycosis Human fungal infections are called human mycosis..pptx
RMMM.pdf make it easy to upload and study
Basic Mud Logging Guide for educational purpose
Lesson notes of climatology university.
Abdominal Access Techniques with Prof. Dr. R K Mishra
school management -TNTEU- B.Ed., Semester II Unit 1.pptx

How to use until successful component

  • 1. How to use Until Successful Component 28-09-2014
  • 2. Abstract • The main motto of this PPT is how to use Until Successful component in our applications.
  • 3. Introduction • The until-successful scope processes messages through the processors within it until the process succeeds. By default, until- successful’s processing occurs asynchronously from the main flow. After passing a message into the until-successful scope, the main flow immediately regains control of the thread. However, you can configure until-successful to run synchronously relative to the main flow.
  • 5. • .mflow• <?xml version="1.0" encoding="UTF-8"?> • <mule xmlns:vm="http://www.mulesoft.org/schema/mule/vm" xmlns:jdbc-ee="http://www.mulesoft.org/schema/mule/ee/jdbc" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd • http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd • http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd • http://www.mulesoft.org/schema/mule/ee/jdbc http://www.mulesoft.org/schema/mule/ee/jdbc/current/mule-jdbc-ee.xsd • http://www.mulesoft.org/schema/mule/vm http://www.mulesoft.org/schema/mule/vm/current/mule-vm.xsd"> • <jdbc-ee:mssql-data-source name="MS_SQL_Data_Source" user=“****" password=“****" url="jdbc:sqlserver://localhost;databaseName=test1" transactionIsolation="UNSPECIFIED" doc:name="MS SQL Data Source"/> • <jdbc-ee:connector name="Database" dataSource-ref="MS_SQL_Data_Source" validateConnections="true" queryTimeout="-1" pollingFrequency="0" doc:name="Database"/> • <spring:beans> • <spring:bean id="Bean" name="Bean" class="org.mule.util.store.SimpleMemoryObjectStore"/> • </spring:beans> • <flow name="Database_ComponentFlow2" doc:name="Database_ComponentFlow2"> • <http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8087" path="UntilSuccessful" doc:name="HTTP"/> • <logger message="--main flow--" level="INFO" doc:name="Logger"/> • <expression-component doc:name="Expression"><![CDATA[ • sessionVars['DB_STATUS']='INITIAL'; • ]]></expression-component> • <until-successful objectStore-ref="Bean" maxRetries="5" secondsBetweenRetries="5" doc:name="Until Successful" failureExpression="#[sessionVars['DB_STATUS']!='SUCCESS']"> • <vm:outbound-endpoint exchange-pattern="request-response" path="db" doc:name="VM"/> • </until-successful> • </flow> • <flow name="Database_ComponentFlow3" doc:name="Database_ComponentFlow3"> • <vm:inbound-endpoint exchange-pattern="request-response" path="db" doc:name="VM"/> • <jdbc-ee:outbound-endpoint exchange-pattern="request-response" queryKey="select" queryTimeout="-1" connector-ref="Database" doc:name="Database"> • <jdbc-ee:query key="select" value="select * from mytable1"/> • </jdbc-ee:outbound-endpoint> • <expression-component doc:name="Expression"><![CDATA[ • sessionVars['DB_STATUS']='SUCCESS'; • ]]></expression-component> • <logger message="--success" level="INFO" doc:name="Logger"/> • </flow> • </mule>
  • 7. • Flow of execution: 1. URL to trigger the service from browser http://localhost:8087/UntilSuccessful 2. Database component connects to the specific database, executes the select query but there is no table specified in DB, hence the until successful component retries for 5 times and exit the flow.