SlideShare a Scribd company logo
1 of 8
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

What's hot

Expression filter in Mule
Expression filter in MuleExpression filter in Mule
Expression filter in MuleKhan625
 
Howtouseforeachcomponent
HowtouseforeachcomponentHowtouseforeachcomponent
Howtouseforeachcomponentakshay yeluru
 
Vm component in mule
Vm component in muleVm component in mule
Vm component in mulejaveed_mhd
 
Message properties component in mule
Message properties component in muleMessage properties component in mule
Message properties component in mulejaveed_mhd
 
File component in mule demo
File component in mule demoFile component in mule demo
File component in mule demoSudha Ch
 
For each component in mule
For each component in muleFor each component in mule
For each component in muleRajkattamuri
 
Mule message processor or routers
Mule message processor or routersMule message processor or routers
Mule message processor or routerssathyaraj Anand
 
Mule esb
Mule esbMule esb
Mule esbKhan625
 
Choice component in mule
Choice component in mule Choice component in mule
Choice component in mule Rajkattamuri
 
Mule servlet connector
Mule servlet connectorMule servlet connector
Mule servlet connectorAnkush Sharma
 
Quartz component in mule demo
Quartz component in mule demoQuartz component in mule demo
Quartz component in mule demoSudha Ch
 
Basic example using for each component
Basic example using for each componentBasic example using for each component
Basic example using for each componentprudhvivreddy
 

What's hot (17)

How to use splitter component
How to use splitter componentHow to use splitter component
How to use splitter component
 
Mule Message Properties Component
Mule Message Properties ComponentMule Message Properties Component
Mule Message Properties Component
 
Expression filter in Mule
Expression filter in MuleExpression filter in Mule
Expression filter in Mule
 
Howtouseforeachcomponent
HowtouseforeachcomponentHowtouseforeachcomponent
Howtouseforeachcomponent
 
Vm component in mule
Vm component in muleVm component in mule
Vm component in mule
 
Message properties component in mule
Message properties component in muleMessage properties component in mule
Message properties component in mule
 
Xslt in mule
Xslt in muleXslt in mule
Xslt in mule
 
File component in mule demo
File component in mule demoFile component in mule demo
File component in mule demo
 
How to use processor chain
How to use processor chainHow to use processor chain
How to use processor chain
 
For each component in mule
For each component in muleFor each component in mule
For each component in mule
 
Mule message processor or routers
Mule message processor or routersMule message processor or routers
Mule message processor or routers
 
Mule esb
Mule esbMule esb
Mule esb
 
Choice component in mule
Choice component in mule Choice component in mule
Choice component in mule
 
xslt in mule
xslt in mulexslt in mule
xslt in mule
 
Mule servlet connector
Mule servlet connectorMule servlet connector
Mule servlet connector
 
Quartz component in mule demo
Quartz component in mule demoQuartz component in mule demo
Quartz component in mule demo
 
Basic example using for each component
Basic example using for each componentBasic example using for each component
Basic example using for each component
 

Viewers also liked

How to use quartz component
How to use quartz componentHow to use quartz component
How to use quartz componentmaheshtheapex
 
Top 5 it director cover letter samples
Top 5 it director cover letter samplesTop 5 it director cover letter samples
Top 5 it director cover letter samplesferidonri
 
Coseri Tatiana - CONTRIBUȚIA ACTIVELOR INTANGIBILE LA SINERGIA INSTITUȚIONALĂ
Coseri Tatiana - CONTRIBUȚIA ACTIVELOR INTANGIBILE LA SINERGIA INSTITUȚIONALĂCoseri Tatiana - CONTRIBUȚIA ACTIVELOR INTANGIBILE LA SINERGIA INSTITUȚIONALĂ
Coseri Tatiana - CONTRIBUȚIA ACTIVELOR INTANGIBILE LA SINERGIA INSTITUȚIONALĂDIB ULIM
 
Rog domingo, mystery trip 2015
Rog domingo, mystery trip 2015Rog domingo, mystery trip 2015
Rog domingo, mystery trip 2015RogDomingoTrips
 
Trouble shooting issues - Case study
Trouble shooting issues - Case studyTrouble shooting issues - Case study
Trouble shooting issues - Case studyMohanraj raj
 
Modelos de e-business
Modelos de e-businessModelos de e-business
Modelos de e-businessOmar Vite
 

Viewers also liked (10)

How to use quartz component
How to use quartz componentHow to use quartz component
How to use quartz component
 
Top 5 it director cover letter samples
Top 5 it director cover letter samplesTop 5 it director cover letter samples
Top 5 it director cover letter samples
 
Coseri Tatiana - CONTRIBUȚIA ACTIVELOR INTANGIBILE LA SINERGIA INSTITUȚIONALĂ
Coseri Tatiana - CONTRIBUȚIA ACTIVELOR INTANGIBILE LA SINERGIA INSTITUȚIONALĂCoseri Tatiana - CONTRIBUȚIA ACTIVELOR INTANGIBILE LA SINERGIA INSTITUȚIONALĂ
Coseri Tatiana - CONTRIBUȚIA ACTIVELOR INTANGIBILE LA SINERGIA INSTITUȚIONALĂ
 
PBS India
PBS IndiaPBS India
PBS India
 
Rog domingo, mystery trip 2015
Rog domingo, mystery trip 2015Rog domingo, mystery trip 2015
Rog domingo, mystery trip 2015
 
Zaštita od sunca
Zaštita od suncaZaštita od sunca
Zaštita od sunca
 
Trouble shooting issues - Case study
Trouble shooting issues - Case studyTrouble shooting issues - Case study
Trouble shooting issues - Case study
 
Vienna
ViennaVienna
Vienna
 
Modelos de e-business
Modelos de e-businessModelos de e-business
Modelos de e-business
 
Final Project Report
Final Project ReportFinal Project Report
Final Project Report
 

Similar to How to use until successful component

Until successful component
Until successful component Until successful component
Until successful component Sunil Komarapu
 
Until successful component in mule
Until successful component in muleUntil successful component in mule
Until successful component in muleF K
 
Until successful component in mule demo
Until successful component in mule demoUntil successful component in mule demo
Until successful component in mule demoSudha Ch
 
Basic example using until successful component
Basic example using until successful componentBasic example using until successful component
Basic example using until successful componentprudhvivreddy
 
Message properties component
Message properties component Message properties component
Message properties component Sunil Komarapu
 
Message properties component
Message properties componentMessage properties component
Message properties componentF K
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties componentmaheshtheapex
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties componentprinceirfancivil
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties componentirfan1008
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties componentPhaniu
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties componentmdfkhan625
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties componentSunil Komarapu
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties componentAnand kalla
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties componentKhasim Saheb
 
Message properties component in Mule
Message properties component in MuleMessage properties component in Mule
Message properties component in MuleKhan625
 

Similar to How to use until successful component (20)

Until successful component
Until successful component Until successful component
Until successful component
 
Until successful component in mule
Until successful component in muleUntil successful component in mule
Until successful component in mule
 
Until successful component in mule demo
Until successful component in mule demoUntil successful component in mule demo
Until successful component in mule demo
 
Basic example using until successful component
Basic example using until successful componentBasic example using until successful component
Basic example using until successful component
 
How to use splitter component
How to use splitter componentHow to use splitter component
How to use splitter component
 
How to use jms outbound endpoint
How to use jms outbound endpointHow to use jms outbound endpoint
How to use jms outbound endpoint
 
How to use jms inbound endpoint
How to use jms inbound endpointHow to use jms inbound endpoint
How to use jms inbound endpoint
 
Message properties component
Message properties component Message properties component
Message properties component
 
Message properties component
Message properties componentMessage properties component
Message properties component
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties component
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties component
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties component
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties component
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties component
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties component
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties component
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties component
 
Message properties component in Mule
Message properties component in MuleMessage properties component in Mule
Message properties component in Mule
 
How to use attachment transformer
How to use attachment transformerHow to use attachment transformer
How to use attachment transformer
 
How to use composite source
How to use composite sourceHow to use composite source
How to use composite source
 

Recently uploaded

21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptxJoelynRubio1
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfDr Vijay Vishwakarma
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Pooja Bhuva
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsNbelano25
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...Nguyen Thanh Tu Collection
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jisc
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17Celine George
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxJisc
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxJisc
 

Recently uploaded (20)

21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf arts
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.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.