SlideShare ist ein Scribd-Unternehmen logo
1 von 8
Until Successful Component
20-12-2015
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

Weitere ähnliche Inhalte

Was ist angesagt?

Expression filter in Mule
Expression filter in MuleExpression filter in Mule
Expression filter in MuleKhan625
 
Until successful component in mule demo
Until successful component in mule demoUntil successful component in mule demo
Until successful component in mule demoSudha Ch
 
Howtouseforeachcomponent
HowtouseforeachcomponentHowtouseforeachcomponent
Howtouseforeachcomponentakshay yeluru
 
Mule message processor or routers
Mule message processor or routersMule message processor or routers
Mule message processor or routerssathyaraj Anand
 
Basic example using for each component
Basic example using for each componentBasic example using for each component
Basic example using for each componentprudhvivreddy
 
Vm component in mule
Vm component in muleVm component in mule
Vm 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 esb
Mule esbMule esb
Mule esbKhan625
 
Choice component in mule
Choice component in mule Choice component in mule
Choice component in mule Rajkattamuri
 
Database component in mule
Database component in muleDatabase component in mule
Database component in muleRajkattamuri
 

Was ist angesagt? (17)

Expression filter in Mule
Expression filter in MuleExpression filter in Mule
Expression filter in Mule
 
Mule Message Properties Component
Mule Message Properties ComponentMule Message Properties Component
Mule Message Properties Component
 
Until successful component in mule demo
Until successful component in mule demoUntil successful component in mule demo
Until successful component in mule demo
 
Xslt in mule
Xslt in muleXslt in mule
Xslt in mule
 
Howtouseforeachcomponent
HowtouseforeachcomponentHowtouseforeachcomponent
Howtouseforeachcomponent
 
Mule message processor or routers
Mule message processor or routersMule message processor or routers
Mule message processor or routers
 
Basic example using for each component
Basic example using for each componentBasic example using for each component
Basic example using for each component
 
Vm component in mule
Vm component in muleVm component in mule
Vm component in mule
 
How to use processor chain
How to use processor chainHow to use processor chain
How to use processor chain
 
File component in mule demo
File component in mule demoFile component in mule demo
File component in mule demo
 
For each component in mule
For each component in muleFor each component in mule
For each component in mule
 
Mule esb
Mule esbMule esb
Mule esb
 
Validate json schema
Validate json schemaValidate json schema
Validate json schema
 
xslt in mule
xslt in mulexslt in mule
xslt in mule
 
Configurare http mule
Configurare http muleConfigurare http mule
Configurare http mule
 
Choice component in mule
Choice component in mule Choice component in mule
Choice component in mule
 
Database component in mule
Database component in muleDatabase component in mule
Database component in mule
 

Andere mochten auch

Securing Systems of Engagement
Securing Systems of EngagementSecuring Systems of Engagement
Securing Systems of EngagementJohn Palfreyman
 
Maria Grazia maffucci presentazione relazionefinale
Maria Grazia maffucci   presentazione relazionefinaleMaria Grazia maffucci   presentazione relazionefinale
Maria Grazia maffucci presentazione relazionefinaleMaria Grazia Maffucci
 
In fowmashon william shakespear and romeo and juleyet
In fowmashon william shakespear and romeo and juleyetIn fowmashon william shakespear and romeo and juleyet
In fowmashon william shakespear and romeo and juleyetJames D'Arcy
 
Maria Grazia Maffucci- programmazione presentazione
Maria Grazia Maffucci- programmazione presentazioneMaria Grazia Maffucci- programmazione presentazione
Maria Grazia Maffucci- programmazione presentazioneMaria Grazia Maffucci
 
SanthoshMP_Resume
SanthoshMP_ResumeSanthoshMP_Resume
SanthoshMP_ResumeSanthosh Mp
 
Maria Grazia Maffucci - relazione di basi di dati
Maria Grazia Maffucci - relazione di basi di datiMaria Grazia Maffucci - relazione di basi di dati
Maria Grazia Maffucci - relazione di basi di datiMaria Grazia Maffucci
 
Maria Grazia Maffucci - progettazione per competenze
Maria Grazia Maffucci - progettazione per competenzeMaria Grazia Maffucci - progettazione per competenze
Maria Grazia Maffucci - progettazione per competenzeMaria Grazia Maffucci
 
Reglamento del aprendiz sena
Reglamento del aprendiz senaReglamento del aprendiz sena
Reglamento del aprendiz senaLarry-97
 
Bob’s retirement model planning model prepared by idriss achour1
Bob’s retirement model planning model prepared by idriss achour1Bob’s retirement model planning model prepared by idriss achour1
Bob’s retirement model planning model prepared by idriss achour1achouri11
 

Andere mochten auch (15)

File component
File componentFile component
File component
 
Securing Systems of Engagement
Securing Systems of EngagementSecuring Systems of Engagement
Securing Systems of Engagement
 
Disol
DisolDisol
Disol
 
Maria Grazia maffucci presentazione relazionefinale
Maria Grazia maffucci   presentazione relazionefinaleMaria Grazia maffucci   presentazione relazionefinale
Maria Grazia maffucci presentazione relazionefinale
 
In fowmashon william shakespear and romeo and juleyet
In fowmashon william shakespear and romeo and juleyetIn fowmashon william shakespear and romeo and juleyet
In fowmashon william shakespear and romeo and juleyet
 
Maria Grazia Maffucci- programmazione presentazione
Maria Grazia Maffucci- programmazione presentazioneMaria Grazia Maffucci- programmazione presentazione
Maria Grazia Maffucci- programmazione presentazione
 
Choice component
Choice componentChoice component
Choice component
 
Internet Then and Now
Internet Then and NowInternet Then and Now
Internet Then and Now
 
Disol
DisolDisol
Disol
 
SanthoshMP_Resume
SanthoshMP_ResumeSanthoshMP_Resume
SanthoshMP_Resume
 
Maria Grazia Maffucci - relazione di basi di dati
Maria Grazia Maffucci - relazione di basi di datiMaria Grazia Maffucci - relazione di basi di dati
Maria Grazia Maffucci - relazione di basi di dati
 
Maria Grazia Maffucci - progettazione per competenze
Maria Grazia Maffucci - progettazione per competenzeMaria Grazia Maffucci - progettazione per competenze
Maria Grazia Maffucci - progettazione per competenze
 
Reglamento del aprendiz sena
Reglamento del aprendiz senaReglamento del aprendiz sena
Reglamento del aprendiz sena
 
Bob’s retirement model planning model prepared by idriss achour1
Bob’s retirement model planning model prepared by idriss achour1Bob’s retirement model planning model prepared by idriss achour1
Bob’s retirement model planning model prepared by idriss achour1
 
Expression Filters
Expression FiltersExpression Filters
Expression Filters
 

Ähnlich wie 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
 
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
 
Message properties component in mule
Message properties component in muleMessage properties component in mule
Message properties component in mulejaveed_mhd
 
Database component
Database component Database component
Database component F K
 
Mule Database component
Mule Database component Mule Database component
Mule Database component AbdulImrankhan7
 
Database component in mule
Database component in muleDatabase component in mule
Database component in mulejaveed_mhd
 
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 componentKhasim Saheb
 
Message properties component in Mule
Message properties component in MuleMessage properties component in Mule
Message properties component in MuleKhan625
 

Ähnlich wie 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
 
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
 
Message properties component in mule
Message properties component in muleMessage properties component in mule
Message properties component in mule
 
Database component
Database component Database component
Database component
 
Mule Database component
Mule Database component Mule Database component
Mule Database component
 
Database component in mule
Database component in muleDatabase component in mule
Database component in mule
 
Database component
Database component Database component
Database 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
 

Kürzlich hochgeladen

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 

Kürzlich hochgeladen (20)

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 

Until Successful Component

  • 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.