SlideShare a Scribd company logo
Mule Exceptions
Handling Exceptions
Handling Exceptions:
o An exception is an event, which occurs during the execution of a program, that disrupts the normal flow of the program.
o To continue the flow execution, we should handle the exceptions.
o There are 2 types of exceptions:
 System Exceptions:
 It is thrown at the system-level when no message is involved.
 It occurs during application start-up or when a connection to an external system fails.
 Message Exceptions:
 It is thrown within a flow whenever a message is involved.
 It occurs due to invalid data or unexpected application scenario.
 Handling System Exceptions:
o When a system exception occurs, a default system exception strategy is invoked.
o Default System Exception Strategy behavior:
 It handles all the system exceptions thrown in Mule applications.
 It stops execution of the flow, logs the exception & rolls back the transaction.
 It is non configurable.
o If the system exception is caused by a connection failure, then we should apply Reconnection Strategy
to continue the flow execution by retrying connection.
 Setting Reconnection Strategy:
Handling System Exceptions
 Handling Messaging Exceptions:
o When a messaging exception occurs, a default messaging exception strategy is invoked.
o Default Messaging Exception Strategy behavior:
 It implicitly and globally handles all messaging exceptions thrown in Mule applications.
 It stops execution of the flow, logs the exception & rolls back the transaction.
 It is non configurable.
o If a messaging exception is caused by invalid data or due to unexpected application scenario, then we
should apply our own Messaging Exception Strategy to continue the flow execution.
 Messaging Exception Strategy:
o When a message being processed through a Mule flow throws an exception:
 Normal flow execution stops.
 The message is passed to the first processor in the exception strategy.
Handing Messaging Exceptions
o Message Exception Strategies are added to the error handling section of a flow.
o Each Exception Strategy can contain any number of message processors.
o All flows can have their own exception strategies.
o Subflows cannot have their own exception strategies.
o If a flow does not have an exception strategy, the strategy of the calling flow is used.
o Each flow can contain only one Exception Strategy.
 Choice Exception Strategies can contain one or more catch and/or rollback exception strategies.
o Mule messaging exception strategies can be categorized in below main parts:
 Catch: Catches exceptions based on conditions.
 Rollback: Rolls back message for reprocessing.
 Choice: Selects one of multiple catch and/or rollback strategies based on condition.
 Reference: Allows us to reference globally defined strategies.
 Custom: Allows us to specify a custom class for handling the exception.
Defining Messaging Exception Strategy
 Flow:
 Response:
Defining Messaging Exception Strategy
 Defining Global Exception Strategy:
o We can reuse exception handling strategies by defining them outside a flow.
 We can drag them out and drop them outside any flow.
 Typically, we put them in our global configuration file.
o We use Reference Exception Strategy to give reference to global exception handlers.
o Default Exception Strategy can be replaced with our own Global Default Exception Strategy by
specifying in global.xml file.
Defining Global Exception Strategy

More Related Content

Similar to Mule exceptions Strategy

Mule - error handling
Mule - error handling Mule - error handling
Mule - error handling
Sindhu VL
 
Mule error handling
Mule error handlingMule error handling
Mule error handling
VirtusaPolaris
 
Anypoint Studio - Mule ESB Error Handling
Anypoint Studio - Mule ESB Error HandlingAnypoint Studio - Mule ESB Error Handling
Anypoint Studio - Mule ESB Error Handling
Mani Rathnam Gudi
 
A short introduction on error handling in anypoint studio
A short introduction on error handling in anypoint studioA short introduction on error handling in anypoint studio
A short introduction on error handling in anypoint studio
Swapnil Sahu
 
Exception strategies in MuleSoft Anypoint Studio
Exception strategies in MuleSoft Anypoint StudioException strategies in MuleSoft Anypoint Studio
Exception strategies in MuleSoft Anypoint Studio
Jitendra Bafna
 
Mule exception strategies
Mule exception strategiesMule exception strategies
Mule exception strategies
Ramakrishna kapa
 
Mule concepts exception strategies
Mule concepts exception strategiesMule concepts exception strategies
Mule concepts exception strategies
kunal vishe
 
Mule error handling
Mule error handlingMule error handling
Mule error handling
Karthik Selvaraj
 
Mule exception handlingstrategies
Mule exception handlingstrategiesMule exception handlingstrategies
Mule exception handlingstrategies
D.Rajesh Kumar
 
Exception handling basics in mule
Exception handling basics in muleException handling basics in mule
Exception handling basics in mule
himajareddys
 
Mule error handling
Mule  error handlingMule  error handling
Mule error handling
chandu1443
 
Handle exceptions in mule
Handle exceptions in muleHandle exceptions in mule
Handle exceptions in mule
Son Nguyen
 
Mule error handling_rollback exception strategy
Mule error handling_rollback exception strategyMule error handling_rollback exception strategy
Mule error handling_rollback exception strategy
kunal vishe
 
Mule exception strategies - Reference Exception Strategy
Mule exception strategies - Reference Exception StrategyMule exception strategies - Reference Exception Strategy
Mule exception strategies - Reference Exception Strategy
Ankush Sharma
 
Vancouver mulesoft meetup_23-july
Vancouver mulesoft meetup_23-julyVancouver mulesoft meetup_23-july
Vancouver mulesoft meetup_23-july
Vikalp Bhalia
 
Maheen oop
Maheen oopMaheen oop
Maheen oop
mahshah212
 
Mule exception strategies - Choice Exception Strategy
Mule exception strategies - Choice Exception StrategyMule exception strategies - Choice Exception Strategy
Mule exception strategies - Choice Exception Strategy
Ankush Sharma
 
Synchronous verses asynchronous processing strategy in mule esb
Synchronous verses asynchronous processing strategy in mule esbSynchronous verses asynchronous processing strategy in mule esb
Synchronous verses asynchronous processing strategy in mule esb
VishnuAnji
 
Exception Handling in UiPath.pptx
Exception Handling in UiPath.pptxException Handling in UiPath.pptx
Exception Handling in UiPath.pptx
ApurbaSamanta9
 
Exception handling in java
Exception handling  in javaException handling  in java
Exception handling in java
Elizabeth alexander
 

Similar to Mule exceptions Strategy (20)

Mule - error handling
Mule - error handling Mule - error handling
Mule - error handling
 
Mule error handling
Mule error handlingMule error handling
Mule error handling
 
Anypoint Studio - Mule ESB Error Handling
Anypoint Studio - Mule ESB Error HandlingAnypoint Studio - Mule ESB Error Handling
Anypoint Studio - Mule ESB Error Handling
 
A short introduction on error handling in anypoint studio
A short introduction on error handling in anypoint studioA short introduction on error handling in anypoint studio
A short introduction on error handling in anypoint studio
 
Exception strategies in MuleSoft Anypoint Studio
Exception strategies in MuleSoft Anypoint StudioException strategies in MuleSoft Anypoint Studio
Exception strategies in MuleSoft Anypoint Studio
 
Mule exception strategies
Mule exception strategiesMule exception strategies
Mule exception strategies
 
Mule concepts exception strategies
Mule concepts exception strategiesMule concepts exception strategies
Mule concepts exception strategies
 
Mule error handling
Mule error handlingMule error handling
Mule error handling
 
Mule exception handlingstrategies
Mule exception handlingstrategiesMule exception handlingstrategies
Mule exception handlingstrategies
 
Exception handling basics in mule
Exception handling basics in muleException handling basics in mule
Exception handling basics in mule
 
Mule error handling
Mule  error handlingMule  error handling
Mule error handling
 
Handle exceptions in mule
Handle exceptions in muleHandle exceptions in mule
Handle exceptions in mule
 
Mule error handling_rollback exception strategy
Mule error handling_rollback exception strategyMule error handling_rollback exception strategy
Mule error handling_rollback exception strategy
 
Mule exception strategies - Reference Exception Strategy
Mule exception strategies - Reference Exception StrategyMule exception strategies - Reference Exception Strategy
Mule exception strategies - Reference Exception Strategy
 
Vancouver mulesoft meetup_23-july
Vancouver mulesoft meetup_23-julyVancouver mulesoft meetup_23-july
Vancouver mulesoft meetup_23-july
 
Maheen oop
Maheen oopMaheen oop
Maheen oop
 
Mule exception strategies - Choice Exception Strategy
Mule exception strategies - Choice Exception StrategyMule exception strategies - Choice Exception Strategy
Mule exception strategies - Choice Exception Strategy
 
Synchronous verses asynchronous processing strategy in mule esb
Synchronous verses asynchronous processing strategy in mule esbSynchronous verses asynchronous processing strategy in mule esb
Synchronous verses asynchronous processing strategy in mule esb
 
Exception Handling in UiPath.pptx
Exception Handling in UiPath.pptxException Handling in UiPath.pptx
Exception Handling in UiPath.pptx
 
Exception handling in java
Exception handling  in javaException handling  in java
Exception handling in java
 

More from Padmanabhan Natarajan, CSM

Mule routers(flowcontrol)
Mule routers(flowcontrol)Mule routers(flowcontrol)
Mule routers(flowcontrol)
Padmanabhan Natarajan, CSM
 
Mule scope
Mule scopeMule scope
Mule dataweave
Mule dataweaveMule dataweave
Mule async scope
Mule async scopeMule async scope
Mule async scope
Padmanabhan Natarajan, CSM
 
Mule filters
Mule filtersMule filters
Mule transformers
Mule transformersMule transformers
Mule transformers
Padmanabhan Natarajan, CSM
 
Mule poll scope
Mule poll scopeMule poll scope
Mule batch processing
Mule batch processingMule batch processing
Mule batch processing
Padmanabhan Natarajan, CSM
 
Introduction to munit
Introduction to munitIntroduction to munit
Introduction to munit
Padmanabhan Natarajan, CSM
 
Mule messages
Mule messagesMule messages
Mule esb
Mule esbMule esb

More from Padmanabhan Natarajan, CSM (11)

Mule routers(flowcontrol)
Mule routers(flowcontrol)Mule routers(flowcontrol)
Mule routers(flowcontrol)
 
Mule scope
Mule scopeMule scope
Mule scope
 
Mule dataweave
Mule dataweaveMule dataweave
Mule dataweave
 
Mule async scope
Mule async scopeMule async scope
Mule async scope
 
Mule filters
Mule filtersMule filters
Mule filters
 
Mule transformers
Mule transformersMule transformers
Mule transformers
 
Mule poll scope
Mule poll scopeMule poll scope
Mule poll scope
 
Mule batch processing
Mule batch processingMule batch processing
Mule batch processing
 
Introduction to munit
Introduction to munitIntroduction to munit
Introduction to munit
 
Mule messages
Mule messagesMule messages
Mule messages
 
Mule esb
Mule esbMule esb
Mule esb
 

Recently uploaded

Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
UiPathCommunity
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
Vlad Stirbu
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 

Recently uploaded (20)

Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 

Mule exceptions Strategy

  • 2. Handling Exceptions Handling Exceptions: o An exception is an event, which occurs during the execution of a program, that disrupts the normal flow of the program. o To continue the flow execution, we should handle the exceptions. o There are 2 types of exceptions:  System Exceptions:  It is thrown at the system-level when no message is involved.  It occurs during application start-up or when a connection to an external system fails.  Message Exceptions:  It is thrown within a flow whenever a message is involved.  It occurs due to invalid data or unexpected application scenario.
  • 3.  Handling System Exceptions: o When a system exception occurs, a default system exception strategy is invoked. o Default System Exception Strategy behavior:  It handles all the system exceptions thrown in Mule applications.  It stops execution of the flow, logs the exception & rolls back the transaction.  It is non configurable. o If the system exception is caused by a connection failure, then we should apply Reconnection Strategy to continue the flow execution by retrying connection.  Setting Reconnection Strategy: Handling System Exceptions
  • 4.  Handling Messaging Exceptions: o When a messaging exception occurs, a default messaging exception strategy is invoked. o Default Messaging Exception Strategy behavior:  It implicitly and globally handles all messaging exceptions thrown in Mule applications.  It stops execution of the flow, logs the exception & rolls back the transaction.  It is non configurable. o If a messaging exception is caused by invalid data or due to unexpected application scenario, then we should apply our own Messaging Exception Strategy to continue the flow execution.  Messaging Exception Strategy: o When a message being processed through a Mule flow throws an exception:  Normal flow execution stops.  The message is passed to the first processor in the exception strategy. Handing Messaging Exceptions
  • 5. o Message Exception Strategies are added to the error handling section of a flow. o Each Exception Strategy can contain any number of message processors. o All flows can have their own exception strategies. o Subflows cannot have their own exception strategies. o If a flow does not have an exception strategy, the strategy of the calling flow is used. o Each flow can contain only one Exception Strategy.  Choice Exception Strategies can contain one or more catch and/or rollback exception strategies. o Mule messaging exception strategies can be categorized in below main parts:  Catch: Catches exceptions based on conditions.  Rollback: Rolls back message for reprocessing.  Choice: Selects one of multiple catch and/or rollback strategies based on condition.  Reference: Allows us to reference globally defined strategies.  Custom: Allows us to specify a custom class for handling the exception. Defining Messaging Exception Strategy
  • 6.  Flow:  Response: Defining Messaging Exception Strategy
  • 7.  Defining Global Exception Strategy: o We can reuse exception handling strategies by defining them outside a flow.  We can drag them out and drop them outside any flow.  Typically, we put them in our global configuration file. o We use Reference Exception Strategy to give reference to global exception handlers. o Default Exception Strategy can be replaced with our own Global Default Exception Strategy by specifying in global.xml file. Defining Global Exception Strategy