SlideShare a Scribd company logo
MULE
Catch Exception
Strategy
INDEX
What is exception?
Mule Exception Strategy
Catch Exception Strategy
Configure Catch Exception Strategy
Result
What is a exception?
An exception is an event, which occurs during the execution of a
program, that disrupts the normal flow of the program's instructions.
When an error occurs within a method, the method creates an object
and hands it off to the runtime system.
Mule Exception Strategy
Mule ESB provides numerous options for handling errors. Faults that occur within Mule are
referred to as exceptions; when an activity in your Mule instance fails, Mule throws an
exception. To manage these exceptions, Mule allows to configure various exception
strategies. There are five of them –
Default Exception strategy
Catch exception strategy
Roll-back exception strategy
Reference exception strategy
Choice exception strategy
In this presentation we’ll talk about Catch exception strategy.
Catch Exception Strategy
When a message throws an exception, the catch exception strategy
always commits the transaction and consumes the message. So it
basically work like try/catch from Java.
Configure Catch Exception Strategy
(Cont.)Following is the XML code for the flow:
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:jersey="http://www.mulesoft.org/schema/mule/jersey"
xmlns:quartz="http://www.mulesoft.org/schema/mule/quartz" 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"
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/quartz http://www.mulesoft.org/schema/mule/quartz/current/mule-quartz.xsd
http://www.mulesoft.org/schema/mule/jersey http://www.mulesoft.org/schema/mule/jersey/current/mule-jersey.xsd">
<http:listener-config name="HTTP_Listener_Configuration" host="0.0.0.0" port="8080" doc:name="HTTP Listener
Configuration"/>
<flow name="http_illustrationFlow">
<http:listener config-ref="HTTP_Listener_Configuration" path="/" doc:name="HTTP"/>
<expression-filter expression="#[payload == 999999999/0" doc:name="Expression"/>
<catch-exception-strategy doc:name="Catch Exception Strategy">
<component class="http_illustration.ErrorHandler" doc:name="Java"/>
</catch-exception-strategy>
</flow>
</mule>
Configure Catch Exception Strategy
The diagrammatic view will be –
Here I’ve created a flow which listens at 8080 port and then there is an
expression with wrong syntax which will throw an exception and then
the flow will transfer to Java class inside Catch exception strategy
where message “Catch exception strategy illustration.” will be
returned to calling entity.
Result
 When there will be a call to this flow from browser, the message returned from
java class will there on browser.

More Related Content

What's hot (7)

ODP
Exception handling basics in mule
himajareddys
 
PPTX
Mule exception strategies
Krishna_in
 
PPTX
Error Handling Framework in Mule ESB
Sashidhar Rao GDS
 
PPTX
Mule exception strategies
Ramakrishna kapa
 
PDF
Exception strategies in MuleSoft Anypoint Studio
Jitendra Bafna
 
PPTX
Mule exceptions Strategy
Padmanabhan Natarajan, CSM
 
PPTX
Mule soft exception
Son Nguyen
 
Exception handling basics in mule
himajareddys
 
Mule exception strategies
Krishna_in
 
Error Handling Framework in Mule ESB
Sashidhar Rao GDS
 
Mule exception strategies
Ramakrishna kapa
 
Exception strategies in MuleSoft Anypoint Studio
Jitendra Bafna
 
Mule exceptions Strategy
Padmanabhan Natarajan, CSM
 
Mule soft exception
Son Nguyen
 

Viewers also liked (16)

PDF
Application Architecture: The Next Wave | MuleSoft
Bui Kiet
 
PPTX
ειρήνη γιαννακοπούλου
rendgia giannakopoulou
 
PPTX
Mule esb handling errors
Naresh Naidu
 
PPTX
Scatter-Gather
Francesca Della Corte
 
PPTX
Perfomance tuning on Go 2.0
Yogi Kulkarni
 
PPTX
Performance tuning in mule
Son Nguyen
 
ODP
Mule flow processing strategies
D.Rajesh Kumar
 
PPTX
Mule ESB Intro
Noga Manela
 
PPTX
Request in mule
Son Nguyen
 
PPTX
Basic example using vm component
prudhvivreddy
 
PPTX
Controlling Message Flow - Mule ESB
Mani Rathnam Gudi
 
PPTX
Elements in a mule flow
Sindhu VL
 
PPTX
Mule ESB Tutorial Part 2
Srikanth N
 
PPT
Mule ESB
niravn
 
PDF
Future of Integration | MuleSoft
MuleSoft
 
Application Architecture: The Next Wave | MuleSoft
Bui Kiet
 
ειρήνη γιαννακοπούλου
rendgia giannakopoulou
 
Mule esb handling errors
Naresh Naidu
 
Scatter-Gather
Francesca Della Corte
 
Perfomance tuning on Go 2.0
Yogi Kulkarni
 
Performance tuning in mule
Son Nguyen
 
Mule flow processing strategies
D.Rajesh Kumar
 
Mule ESB Intro
Noga Manela
 
Request in mule
Son Nguyen
 
Basic example using vm component
prudhvivreddy
 
Controlling Message Flow - Mule ESB
Mani Rathnam Gudi
 
Elements in a mule flow
Sindhu VL
 
Mule ESB Tutorial Part 2
Srikanth N
 
Mule ESB
niravn
 
Future of Integration | MuleSoft
MuleSoft
 
Ad

Similar to Mule exception strategies - Catch exception strategy (20)

PPT
Mule exception strategies - Reference Exception Strategy
Ankush Sharma
 
PPT
Mule exception strategies - Choice Exception Strategy
Ankush Sharma
 
PPTX
Anypoint Studio - Mule ESB Error Handling
Mani Rathnam Gudi
 
PPTX
Mule - error handling
Sindhu VL
 
PPTX
A short introduction on error handling in anypoint studio
Swapnil Sahu
 
PPTX
Mule concepts exception strategies
kunal vishe
 
PPTX
Vancouver mulesoft meetup_23-july
Vikalp Bhalia
 
PPTX
Mule error handling
chandu1443
 
PPTX
Online Spanish meetup #1
Alexandra N. Martinez
 
PPTX
Virtual MuleSoft Meetup may_2020
Om Prakash
 
PPTX
Exception handling in Mule 4 _Virtual mule soft meetup may_2020
Om Prakash
 
PPTX
UNIT-3.pptx Exception Handling and Multithreading
SakkaravarthiS1
 
PPTX
Caught in Action Mastering try catch block.pptx
ayanmahapatra4
 
PPTX
Mule error handling_choice exception strategy
kunal vishe
 
PPTX
Exception Handling in UiPath.pptx
ApurbaSamanta9
 
PPTX
Java Exception Handling and examples about it
2022002857mbit
 
PDF
A comprehensive guide to mule soft mule 4
pruthviraj krishnam
 
PPTX
Maheen oop
mahshah212
 
PPTX
Exception handling in mule
nagarajupatangay
 
ODP
Mule exception handlingstrategies
D.Rajesh Kumar
 
Mule exception strategies - Reference Exception Strategy
Ankush Sharma
 
Mule exception strategies - Choice Exception Strategy
Ankush Sharma
 
Anypoint Studio - Mule ESB Error Handling
Mani Rathnam Gudi
 
Mule - error handling
Sindhu VL
 
A short introduction on error handling in anypoint studio
Swapnil Sahu
 
Mule concepts exception strategies
kunal vishe
 
Vancouver mulesoft meetup_23-july
Vikalp Bhalia
 
Mule error handling
chandu1443
 
Online Spanish meetup #1
Alexandra N. Martinez
 
Virtual MuleSoft Meetup may_2020
Om Prakash
 
Exception handling in Mule 4 _Virtual mule soft meetup may_2020
Om Prakash
 
UNIT-3.pptx Exception Handling and Multithreading
SakkaravarthiS1
 
Caught in Action Mastering try catch block.pptx
ayanmahapatra4
 
Mule error handling_choice exception strategy
kunal vishe
 
Exception Handling in UiPath.pptx
ApurbaSamanta9
 
Java Exception Handling and examples about it
2022002857mbit
 
A comprehensive guide to mule soft mule 4
pruthviraj krishnam
 
Maheen oop
mahshah212
 
Exception handling in mule
nagarajupatangay
 
Mule exception handlingstrategies
D.Rajesh Kumar
 
Ad

More from Ankush Sharma (20)

PPTX
Mule Microsoft Share Point 2010 Connector
Ankush Sharma
 
PPTX
Mule Microsoft Share Point 2013 Connector
Ankush Sharma
 
PPTX
Mule Microsoft Service Bus
Ankush Sharma
 
PPTX
Microsoft Dynamics CRM Connector
Ankush Sharma
 
PPTX
Mule Microsoft Dynamics AX 2012 Connector
Ankush Sharma
 
PPTX
Mule Marketo Connector
Ankush Sharma
 
PPTX
Mule LDAP Connector
Ankush Sharma
 
PPTX
Mule HDFS Connector
Ankush Sharma
 
PPTX
Mule Concur Connector
Ankush Sharma
 
PPTX
Mule Cloudhub Connector
Ankush Sharma
 
PPTX
Mule AMQP Connector
Ankush Sharma
 
PPTX
Mule Amazon SNS Connector
Ankush Sharma
 
PPTX
Mule Collection Aggregator
Ankush Sharma
 
PPTX
Mule Collection Splitter
Ankush Sharma
 
PPTX
Mule Custom Aggregator
Ankush Sharma
 
PPTX
Mule Message Chunk Aggregator
Ankush Sharma
 
PPTX
Mule Message Chunk Splitter
Ankush Sharma
 
PPTX
Mule Expression Transformer
Ankush Sharma
 
PPTX
Mule Schema Validation Filter
Ankush Sharma
 
PPTX
Mule Resequencer Filter
Ankush Sharma
 
Mule Microsoft Share Point 2010 Connector
Ankush Sharma
 
Mule Microsoft Share Point 2013 Connector
Ankush Sharma
 
Mule Microsoft Service Bus
Ankush Sharma
 
Microsoft Dynamics CRM Connector
Ankush Sharma
 
Mule Microsoft Dynamics AX 2012 Connector
Ankush Sharma
 
Mule Marketo Connector
Ankush Sharma
 
Mule LDAP Connector
Ankush Sharma
 
Mule HDFS Connector
Ankush Sharma
 
Mule Concur Connector
Ankush Sharma
 
Mule Cloudhub Connector
Ankush Sharma
 
Mule AMQP Connector
Ankush Sharma
 
Mule Amazon SNS Connector
Ankush Sharma
 
Mule Collection Aggregator
Ankush Sharma
 
Mule Collection Splitter
Ankush Sharma
 
Mule Custom Aggregator
Ankush Sharma
 
Mule Message Chunk Aggregator
Ankush Sharma
 
Mule Message Chunk Splitter
Ankush Sharma
 
Mule Expression Transformer
Ankush Sharma
 
Mule Schema Validation Filter
Ankush Sharma
 
Mule Resequencer Filter
Ankush Sharma
 

Recently uploaded (20)

PDF
Add Background Images to Charts in IBM SPSS Statistics Version 31.pdf
Version 1 Analytics
 
PDF
Top Agile Project Management Tools for Teams in 2025
Orangescrum
 
PPTX
Home Care Tools: Benefits, features and more
Third Rock Techkno
 
PDF
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
PDF
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
PPTX
In From the Cold: Open Source as Part of Mainstream Software Asset Management
Shane Coughlan
 
PDF
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
PDF
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 
PPTX
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PPTX
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
PPTX
Customise Your Correlation Table in IBM SPSS Statistics.pptx
Version 1 Analytics
 
PPTX
AEM User Group: India Chapter Kickoff Meeting
jennaf3
 
PDF
Empower Your Tech Vision- Why Businesses Prefer to Hire Remote Developers fro...
logixshapers59
 
PDF
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
PDF
AI + DevOps = Smart Automation with devseccops.ai.pdf
Devseccops.ai
 
PDF
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
PDF
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
PPTX
Help for Correlations in IBM SPSS Statistics.pptx
Version 1 Analytics
 
PDF
Technical-Careers-Roadmap-in-Software-Market.pdf
Hussein Ali
 
PDF
4K Video Downloader Plus Pro Crack for MacOS New Download 2025
bashirkhan333g
 
Add Background Images to Charts in IBM SPSS Statistics Version 31.pdf
Version 1 Analytics
 
Top Agile Project Management Tools for Teams in 2025
Orangescrum
 
Home Care Tools: Benefits, features and more
Third Rock Techkno
 
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
In From the Cold: Open Source as Part of Mainstream Software Asset Management
Shane Coughlan
 
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
Customise Your Correlation Table in IBM SPSS Statistics.pptx
Version 1 Analytics
 
AEM User Group: India Chapter Kickoff Meeting
jennaf3
 
Empower Your Tech Vision- Why Businesses Prefer to Hire Remote Developers fro...
logixshapers59
 
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
AI + DevOps = Smart Automation with devseccops.ai.pdf
Devseccops.ai
 
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
Help for Correlations in IBM SPSS Statistics.pptx
Version 1 Analytics
 
Technical-Careers-Roadmap-in-Software-Market.pdf
Hussein Ali
 
4K Video Downloader Plus Pro Crack for MacOS New Download 2025
bashirkhan333g
 

Mule exception strategies - Catch exception strategy

  • 2. INDEX What is exception? Mule Exception Strategy Catch Exception Strategy Configure Catch Exception Strategy Result
  • 3. What is a exception? An exception is an event, which occurs during the execution of a program, that disrupts the normal flow of the program's instructions. When an error occurs within a method, the method creates an object and hands it off to the runtime system.
  • 4. Mule Exception Strategy Mule ESB provides numerous options for handling errors. Faults that occur within Mule are referred to as exceptions; when an activity in your Mule instance fails, Mule throws an exception. To manage these exceptions, Mule allows to configure various exception strategies. There are five of them – Default Exception strategy Catch exception strategy Roll-back exception strategy Reference exception strategy Choice exception strategy In this presentation we’ll talk about Catch exception strategy.
  • 5. Catch Exception Strategy When a message throws an exception, the catch exception strategy always commits the transaction and consumes the message. So it basically work like try/catch from Java.
  • 6. Configure Catch Exception Strategy (Cont.)Following is the XML code for the flow: <?xml version="1.0" encoding="UTF-8"?> <mule xmlns:jersey="http://www.mulesoft.org/schema/mule/jersey" xmlns:quartz="http://www.mulesoft.org/schema/mule/quartz" 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" 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/quartz http://www.mulesoft.org/schema/mule/quartz/current/mule-quartz.xsd http://www.mulesoft.org/schema/mule/jersey http://www.mulesoft.org/schema/mule/jersey/current/mule-jersey.xsd"> <http:listener-config name="HTTP_Listener_Configuration" host="0.0.0.0" port="8080" doc:name="HTTP Listener Configuration"/> <flow name="http_illustrationFlow"> <http:listener config-ref="HTTP_Listener_Configuration" path="/" doc:name="HTTP"/> <expression-filter expression="#[payload == 999999999/0" doc:name="Expression"/> <catch-exception-strategy doc:name="Catch Exception Strategy"> <component class="http_illustration.ErrorHandler" doc:name="Java"/> </catch-exception-strategy> </flow> </mule>
  • 7. Configure Catch Exception Strategy The diagrammatic view will be – Here I’ve created a flow which listens at 8080 port and then there is an expression with wrong syntax which will throw an exception and then the flow will transfer to Java class inside Catch exception strategy where message “Catch exception strategy illustration.” will be returned to calling entity.
  • 8. Result  When there will be a call to this flow from browser, the message returned from java class will there on browser.