SlideShare une entreprise Scribd logo
1  sur  8
By
Sudha Ch
 The main motto of this PPT is how to use
Until Successful component in our
applications.
 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.
 .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.
 https://docs.mulesoft.com/mule-user-
guide/v/3.5/until-successful-scope

Contenu connexe

Tendances

Tendances (19)

Mule architecture
Mule   architectureMule   architecture
Mule architecture
 
Mulesoft idempotent Message Filter
Mulesoft idempotent Message FilterMulesoft idempotent Message Filter
Mulesoft idempotent Message Filter
 
Mule batch job
Mule batch jobMule batch job
Mule batch job
 
For each component in mule demo
For each component in mule demoFor each component in mule demo
For each component in mule demo
 
Vm component in mule demo
Vm component in mule demoVm component in mule demo
Vm component in mule demo
 
Introduction to mule esb
Introduction to mule esbIntroduction to mule esb
Introduction to mule esb
 
Send email attachment using smtp in mule esb
Send email attachment using smtp in mule esbSend email attachment using smtp in mule esb
Send email attachment using smtp in mule esb
 
Mulesoft vm transport reference
Mulesoft vm transport referenceMulesoft vm transport reference
Mulesoft vm transport reference
 
Choice component in mule demo
Choice component in mule demoChoice component in mule demo
Choice component in mule demo
 
Mule quartz
Mule quartz Mule quartz
Mule quartz
 
Webservice vm in mule
Webservice vm in muleWebservice vm in mule
Webservice vm in mule
 
Mule esb
Mule esbMule esb
Mule esb
 
Mule chapter2
Mule chapter2Mule chapter2
Mule chapter2
 
Service orchestration by using flows
Service orchestration by using flowsService orchestration by using flows
Service orchestration by using flows
 
Mule Integration Simplified
Mule Integration SimplifiedMule Integration Simplified
Mule Integration Simplified
 
Web service vm in mule
Web service vm in muleWeb service vm in mule
Web service vm in mule
 
Scatter gather flow in mule
Scatter gather flow in muleScatter gather flow in mule
Scatter gather flow in mule
 
Mule soa
Mule soaMule soa
Mule soa
 
Mule message
Mule messageMule message
Mule message
 

Similaire à Until successful component in mule demo

Similaire à Until successful component in mule demo (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
Until successful component in muleUntil successful component in mule
Until successful component in mule
 
How to use until successful component
How to use until successful componentHow to use until successful component
How to use until successful component
 
Until Successful Component
Until Successful ComponentUntil Successful Component
Until Successful Component
 
Basic example using until successful component
Basic example using until successful componentBasic example using until successful component
Basic example using until successful component
 
Howtouseforeachcomponent
HowtouseforeachcomponentHowtouseforeachcomponent
Howtouseforeachcomponent
 
Message properties component in mule demo
Message properties component in mule demoMessage properties component in mule demo
Message properties component in mule demo
 
Splitter
SplitterSplitter
Splitter
 
How to use splitter component
How to use splitter componentHow to use splitter component
How to use splitter component
 
How to use splitter component
How to use splitter componentHow to use splitter component
How to use splitter component
 
Message properties component in mule
Message properties component in muleMessage properties component in mule
Message properties component in mule
 
Wildcard Filter
Wildcard FilterWildcard Filter
Wildcard Filter
 
How to use processor chain
How to use processor chainHow to use processor chain
How to use processor chain
 
How to use jms outbound endpoint
How to use jms outbound endpointHow to use jms outbound endpoint
How to use jms outbound endpoint
 
Expression
ExpressionExpression
Expression
 
Filter expression in mule demo
Filter expression in mule demoFilter expression in mule demo
Filter expression 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
 
Or Filter
Or FilterOr Filter
Or Filter
 
How to use composite source
How to use composite sourceHow to use composite source
How to use composite source
 

Plus de Sudha Ch

Plus de Sudha Ch (12)

Git hub plugin setup and working with Git hub on anypoint studio
Git hub plugin setup and working with Git hub on anypoint studioGit hub plugin setup and working with Git hub on anypoint studio
Git hub plugin setup and working with Git hub on anypoint studio
 
Mule management console installation with Tomcat
Mule management console installation with TomcatMule management console installation with Tomcat
Mule management console installation with Tomcat
 
How to commit a project in svn using svn plugin in anypoint studio
How to commit a project in svn using svn plugin in anypoint studioHow to commit a project in svn using svn plugin in anypoint studio
How to commit a project in svn using svn plugin in anypoint studio
 
JUnit and MUnit Set Up In Anypoint Studio
JUnit and MUnit Set Up In Anypoint StudioJUnit and MUnit Set Up In Anypoint Studio
JUnit and MUnit Set Up In Anypoint Studio
 
How To Install Sonar Qube Plugin In Anypoint Studio
How To Install Sonar Qube Plugin In Anypoint StudioHow To Install Sonar Qube Plugin In Anypoint Studio
How To Install Sonar Qube Plugin In Anypoint Studio
 
Quartz component in mule demo
Quartz component in mule demoQuartz component in mule demo
Quartz component in mule demo
 
Junit in mule demo
Junit in mule demoJunit in mule demo
Junit in mule demo
 
File component in mule demo
File component in mule demoFile component in mule demo
File component in mule demo
 
Database component in mule demo
Database component in mule demoDatabase component in mule demo
Database component in mule demo
 
Mule esb made system integration easy
Mule esb made system integration easyMule esb made system integration easy
Mule esb made system integration easy
 
Telling the world why we love mule soft!
Telling the world why we love mule soft!Telling the world why we love mule soft!
Telling the world why we love mule soft!
 
Telling the world why we love mule soft!
Telling the world why we love mule soft!Telling the world why we love mule soft!
Telling the world why we love mule soft!
 

Dernier

JustNaik Solution Deck (stage bus sector)
JustNaik Solution Deck (stage bus sector)JustNaik Solution Deck (stage bus sector)
JustNaik Solution Deck (stage bus sector)
Max Lee
 
Mastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdfMastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdf
mbmh111980
 

Dernier (20)

A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
 
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
 
AI Hackathon.pptx
AI                        Hackathon.pptxAI                        Hackathon.pptx
AI Hackathon.pptx
 
OpenChain @ LF Japan Executive Briefing - May 2024
OpenChain @ LF Japan Executive Briefing - May 2024OpenChain @ LF Japan Executive Briefing - May 2024
OpenChain @ LF Japan Executive Briefing - May 2024
 
JustNaik Solution Deck (stage bus sector)
JustNaik Solution Deck (stage bus sector)JustNaik Solution Deck (stage bus sector)
JustNaik Solution Deck (stage bus sector)
 
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdf
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdfImplementing KPIs and Right Metrics for Agile Delivery Teams.pdf
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdf
 
AI/ML Infra Meetup | ML explainability in Michelangelo
AI/ML Infra Meetup | ML explainability in MichelangeloAI/ML Infra Meetup | ML explainability in Michelangelo
AI/ML Infra Meetup | ML explainability in Michelangelo
 
Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024
 
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
 
Workforce Efficiency with Employee Time Tracking Software.pdf
Workforce Efficiency with Employee Time Tracking Software.pdfWorkforce Efficiency with Employee Time Tracking Software.pdf
Workforce Efficiency with Employee Time Tracking Software.pdf
 
5 Reasons Driving Warehouse Management Systems Demand
5 Reasons Driving Warehouse Management Systems Demand5 Reasons Driving Warehouse Management Systems Demand
5 Reasons Driving Warehouse Management Systems Demand
 
SQL Injection Introduction and Prevention
SQL Injection Introduction and PreventionSQL Injection Introduction and Prevention
SQL Injection Introduction and Prevention
 
10 Essential Software Testing Tools You Need to Know About.pdf
10 Essential Software Testing Tools You Need to Know About.pdf10 Essential Software Testing Tools You Need to Know About.pdf
10 Essential Software Testing Tools You Need to Know About.pdf
 
How to pick right visual testing tool.pdf
How to pick right visual testing tool.pdfHow to pick right visual testing tool.pdf
How to pick right visual testing tool.pdf
 
Mastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdfMastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdf
 
AI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning FrameworkAI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning Framework
 
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAGAI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
 
CompTIA Security+ (Study Notes) for cs.pdf
CompTIA Security+ (Study Notes) for cs.pdfCompTIA Security+ (Study Notes) for cs.pdf
CompTIA Security+ (Study Notes) for cs.pdf
 
INGKA DIGITAL: Linked Metadata by Design
INGKA DIGITAL: Linked Metadata by DesignINGKA DIGITAL: Linked Metadata by Design
INGKA DIGITAL: Linked Metadata by Design
 
Crafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM IntegrationCrafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM Integration
 

Until successful component in mule demo

  • 2.  The main motto of this PPT is how to use Until Successful component in our applications.
  • 3.  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.
  • 4.
  • 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.