SlideShare a Scribd company logo
EXCEPTION HANDLING
Mule has a special way of handling non-happy path
processing. This is called an "Exception Strategy" but is it
really just and exception path and there is very little
strategy involved.
There are three places you can associate an exception
strategy
 connector
 component
 model (set for all components in a model)
1
EXCEPTION STRATEGY
<exception-strategy
className=org.mule.impl.DefaultComponentExceptionStrategy">
<endpoint address="file:///c:/mule-class/error"/>
</exception-strategy>
2
We want all invalid documents to be moved into the error folder.
SAMPLE XML
<?xml version="1.0" encoding="UTF-8"?>
<Data>
<Element1>Hello World!</Element1>
<Element2>String</Element2>
<Element3>String</Element3>
<DansInvalidDataElement>This is Dans invalid data element</DansInvalidDataElement>
</Data>
3
XML Schema validation will generate an error message when it gets to the
fourth invalid data element:
Given the following XML Schema file:
VALIDATING AGAINST AN XML SCHEMA
<outbound-router>
<router className="org.mule.routing.outbound.FilteringXmlMessageSplitter">
<endpoint
address="file:///c:/mule-class/out?outputPattern=$[ORIGINALNAME]"/>
<properties>
<property name="validateSchema" value="true"/>
<property name="externalSchemaLocation"
value="file:///c:/mule-class/labs/07-validate/my-schema.xsd"/>
</properties>
</router>
</outbound-router>
4
To validate the XML Schema, just add two properties:
1) tell it to validate the document
2) tell it what file to use and where to find it
ERROR MESSAGE
document : cvc-complex-type.2.4.d: Invalid content was found
starting with element 'DansInvalidDataElement'. No child
element is expected at this point.
5
This error message is generated on the Mule console when an invalid data
element is found. But what should we do with it? How do we redirect it to
the appropriate user?

More Related Content

What's hot (13)

PPTX
How to use or filter
RaviRajuRamaKrishna
 
PPTX
How to use and filter
RaviRajuRamaKrishna
 
PPTX
Macro teradata
Srinimf-Slides
 
PPTX
Splitter
sivachandra mandalapu
 
PPTX
Data Mapper
sivachandra mandalapu
 
PPT
Mule security
Praneethchampion
 
PPTX
Expression
sivachandra mandalapu
 
PPTX
Collection aggregator
sivachandra mandalapu
 
PPTX
Defining global exception strategies
sivachandra mandalapu
 
PPTX
Reference exception strategy
sivachandra mandalapu
 
PPTX
How to use expression filter
Praneethchampion
 
PPTX
Expression filter in Mule
Mohammed246
 
PPTX
Validate json schema
sivachandra mandalapu
 
How to use or filter
RaviRajuRamaKrishna
 
How to use and filter
RaviRajuRamaKrishna
 
Macro teradata
Srinimf-Slides
 
Mule security
Praneethchampion
 
Collection aggregator
sivachandra mandalapu
 
Defining global exception strategies
sivachandra mandalapu
 
Reference exception strategy
sivachandra mandalapu
 
How to use expression filter
Praneethchampion
 
Expression filter in Mule
Mohammed246
 
Validate json schema
sivachandra mandalapu
 

Viewers also liked (6)

PPTX
Mule exception strategies
Krishna_in
 
PPTX
Mule expression component
Karnam Karthik
 
PPTX
Error Handling Framework in Mule ESB
Sashidhar Rao GDS
 
PPTX
Message enricher in mule
Sashidhar Rao GDS
 
PDF
Mule esb examples
Sashidhar Rao GDS
 
PPT
Mulesoft ppt
Achyuta Lakshmi
 
Mule exception strategies
Krishna_in
 
Mule expression component
Karnam Karthik
 
Error Handling Framework in Mule ESB
Sashidhar Rao GDS
 
Message enricher in mule
Sashidhar Rao GDS
 
Mule esb examples
Sashidhar Rao GDS
 
Mulesoft ppt
Achyuta Lakshmi
 
Ad

Similar to Exception handling in mule (20)

PPTX
Mulesoft meetup slides mumbai_20113019_exception_handling
Manish Kumar Yadav
 
PPTX
Exception handling in Mule 4 _Virtual mule soft meetup may_2020
Om Prakash
 
PPTX
Virtual MuleSoft Meetup may_2020
Om Prakash
 
PPTX
Soap in mule
D.Rajesh Kumar
 
PPTX
Soap in mule
D.Rajesh Kumar
 
PPTX
Elements in a mule flow
Sindhu VL
 
PPTX
Soap request in mule
Praneethchampion
 
PPTX
Validating a soap request in mule
Rajkattamuri
 
PPTX
Validating a soap request in mule
Khan625
 
PPTX
Validating a soap request in mule
AbdulImrankhan7
 
PPTX
Validating soap request in mule
javeed_mhd
 
PPTX
Validate soap request in mule
Hasan Syed
 
PPTX
Validate soap request in mule
Mohammed246
 
PPTX
Validating soap request in mule
mdfkhan625
 
PPTX
Validate soap request in mule
Sunil Komarapu
 
PPTX
Validate Soap Request in Mule
irfan1008
 
PPTX
Elements in a muleflow
Thang Loi
 
PPTX
Schema validation filter (xml schema validation)
Ankit Lawaniya
 
PPTX
Error handling in mule
Sindhu VL
 
PPTX
Mule soap
Khasim Saheb
 
Mulesoft meetup slides mumbai_20113019_exception_handling
Manish Kumar Yadav
 
Exception handling in Mule 4 _Virtual mule soft meetup may_2020
Om Prakash
 
Virtual MuleSoft Meetup may_2020
Om Prakash
 
Soap in mule
D.Rajesh Kumar
 
Soap in mule
D.Rajesh Kumar
 
Elements in a mule flow
Sindhu VL
 
Soap request in mule
Praneethchampion
 
Validating a soap request in mule
Rajkattamuri
 
Validating a soap request in mule
Khan625
 
Validating a soap request in mule
AbdulImrankhan7
 
Validating soap request in mule
javeed_mhd
 
Validate soap request in mule
Hasan Syed
 
Validate soap request in mule
Mohammed246
 
Validating soap request in mule
mdfkhan625
 
Validate soap request in mule
Sunil Komarapu
 
Validate Soap Request in Mule
irfan1008
 
Elements in a muleflow
Thang Loi
 
Schema validation filter (xml schema validation)
Ankit Lawaniya
 
Error handling in mule
Sindhu VL
 
Mule soap
Khasim Saheb
 
Ad

More from nagarajupatangay (8)

PPTX
Spring mvc
nagarajupatangay
 
PPTX
Java script object notation(json)
nagarajupatangay
 
PPTX
Web service
nagarajupatangay
 
PPTX
Billing and Revenue Management
nagarajupatangay
 
Spring mvc
nagarajupatangay
 
Java script object notation(json)
nagarajupatangay
 
Web service
nagarajupatangay
 
Billing and Revenue Management
nagarajupatangay
 

Recently uploaded (20)

PDF
Generative AI: it's STILL not a robot (CIJ Summer 2025)
Paul Bradshaw
 
PPTX
grade 5 lesson ENGLISH 5_Q1_PPT_WEEK3.pptx
SireQuinn
 
PDF
Lesson 2 - WATER,pH, BUFFERS, AND ACID-BASE.pdf
marvinnbustamante1
 
PDF
CONCURSO DE POESIA “POETUFAS – PASSOS SUAVES PELO VERSO.pdf
Colégio Santa Teresinha
 
PPTX
Pyhton with Mysql to perform CRUD operations.pptx
Ramakrishna Reddy Bijjam
 
PDF
The Different Types of Non-Experimental Research
Thelma Villaflores
 
PDF
LAW OF CONTRACT ( 5 YEAR LLB & UNITARY LLB)- MODULE-3 - LEARN THROUGH PICTURE
APARNA T SHAIL KUMAR
 
PPTX
How to Manage Large Scrollbar in Odoo 18 POS
Celine George
 
PDF
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - GLOBAL SUCCESS - CẢ NĂM - NĂM 2024 (VOCABULARY, ...
Nguyen Thanh Tu Collection
 
PPTX
SPINA BIFIDA: NURSING MANAGEMENT .pptx
PRADEEP ABOTHU
 
PDF
Dimensions of Societal Planning in Commonism
StefanMz
 
PDF
Isharyanti-2025-Cross Language Communication in Indonesian Language
Neny Isharyanti
 
PDF
ARAL-Orientation_Morning-Session_Day-11.pdf
JoelVilloso1
 
PPTX
How to Create a PDF Report in Odoo 18 - Odoo Slides
Celine George
 
PPTX
MENINGITIS: NURSING MANAGEMENT, BACTERIAL MENINGITIS, VIRAL MENINGITIS.pptx
PRADEEP ABOTHU
 
PPTX
Growth and development and milestones, factors
BHUVANESHWARI BADIGER
 
PDF
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
PPTX
HYDROCEPHALUS: NURSING MANAGEMENT .pptx
PRADEEP ABOTHU
 
PDF
SSHS-2025-PKLP_Quarter-1-Dr.-Kerby-Alvarez.pdf
AishahSangcopan1
 
PPTX
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
Generative AI: it's STILL not a robot (CIJ Summer 2025)
Paul Bradshaw
 
grade 5 lesson ENGLISH 5_Q1_PPT_WEEK3.pptx
SireQuinn
 
Lesson 2 - WATER,pH, BUFFERS, AND ACID-BASE.pdf
marvinnbustamante1
 
CONCURSO DE POESIA “POETUFAS – PASSOS SUAVES PELO VERSO.pdf
Colégio Santa Teresinha
 
Pyhton with Mysql to perform CRUD operations.pptx
Ramakrishna Reddy Bijjam
 
The Different Types of Non-Experimental Research
Thelma Villaflores
 
LAW OF CONTRACT ( 5 YEAR LLB & UNITARY LLB)- MODULE-3 - LEARN THROUGH PICTURE
APARNA T SHAIL KUMAR
 
How to Manage Large Scrollbar in Odoo 18 POS
Celine George
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - GLOBAL SUCCESS - CẢ NĂM - NĂM 2024 (VOCABULARY, ...
Nguyen Thanh Tu Collection
 
SPINA BIFIDA: NURSING MANAGEMENT .pptx
PRADEEP ABOTHU
 
Dimensions of Societal Planning in Commonism
StefanMz
 
Isharyanti-2025-Cross Language Communication in Indonesian Language
Neny Isharyanti
 
ARAL-Orientation_Morning-Session_Day-11.pdf
JoelVilloso1
 
How to Create a PDF Report in Odoo 18 - Odoo Slides
Celine George
 
MENINGITIS: NURSING MANAGEMENT, BACTERIAL MENINGITIS, VIRAL MENINGITIS.pptx
PRADEEP ABOTHU
 
Growth and development and milestones, factors
BHUVANESHWARI BADIGER
 
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
HYDROCEPHALUS: NURSING MANAGEMENT .pptx
PRADEEP ABOTHU
 
SSHS-2025-PKLP_Quarter-1-Dr.-Kerby-Alvarez.pdf
AishahSangcopan1
 
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 

Exception handling in mule

  • 1. EXCEPTION HANDLING Mule has a special way of handling non-happy path processing. This is called an "Exception Strategy" but is it really just and exception path and there is very little strategy involved. There are three places you can associate an exception strategy  connector  component  model (set for all components in a model) 1
  • 3. SAMPLE XML <?xml version="1.0" encoding="UTF-8"?> <Data> <Element1>Hello World!</Element1> <Element2>String</Element2> <Element3>String</Element3> <DansInvalidDataElement>This is Dans invalid data element</DansInvalidDataElement> </Data> 3 XML Schema validation will generate an error message when it gets to the fourth invalid data element: Given the following XML Schema file:
  • 4. VALIDATING AGAINST AN XML SCHEMA <outbound-router> <router className="org.mule.routing.outbound.FilteringXmlMessageSplitter"> <endpoint address="file:///c:/mule-class/out?outputPattern=$[ORIGINALNAME]"/> <properties> <property name="validateSchema" value="true"/> <property name="externalSchemaLocation" value="file:///c:/mule-class/labs/07-validate/my-schema.xsd"/> </properties> </router> </outbound-router> 4 To validate the XML Schema, just add two properties: 1) tell it to validate the document 2) tell it what file to use and where to find it
  • 5. ERROR MESSAGE document : cvc-complex-type.2.4.d: Invalid content was found starting with element 'DansInvalidDataElement'. No child element is expected at this point. 5 This error message is generated on the Mule console when an invalid data element is found. But what should we do with it? How do we redirect it to the appropriate user?