SlideShare a Scribd company logo
1 of 7
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
 
Anypoint Studio - Mule ESB Error Handling
Anypoint Studio - Mule ESB Error HandlingAnypoint Studio - Mule ESB Error Handling
Anypoint Studio - Mule ESB Error HandlingMani 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 studioSwapnil Sahu
 
Exception strategies in MuleSoft Anypoint Studio
Exception strategies in MuleSoft Anypoint StudioException strategies in MuleSoft Anypoint Studio
Exception strategies in MuleSoft Anypoint StudioJitendra Bafna
 
Mule concepts exception strategies
Mule concepts exception strategiesMule concepts exception strategies
Mule concepts exception strategieskunal vishe
 
Mule exception handlingstrategies
Mule exception handlingstrategiesMule exception handlingstrategies
Mule exception handlingstrategiesD.Rajesh Kumar
 
Exception handling basics in mule
Exception handling basics in muleException handling basics in mule
Exception handling basics in mulehimajareddys
 
Mule error handling
Mule  error handlingMule  error handling
Mule error handlingchandu1443
 
Handle exceptions in mule
Handle exceptions in muleHandle exceptions in mule
Handle exceptions in muleSon Nguyen
 
Mule error handling_rollback exception strategy
Mule error handling_rollback exception strategyMule error handling_rollback exception strategy
Mule error handling_rollback exception strategykunal vishe
 
Mule exception strategies - Reference Exception Strategy
Mule exception strategies - Reference Exception StrategyMule exception strategies - Reference Exception Strategy
Mule exception strategies - Reference Exception StrategyAnkush Sharma
 
Vancouver mulesoft meetup_23-july
Vancouver mulesoft meetup_23-julyVancouver mulesoft meetup_23-july
Vancouver mulesoft meetup_23-julyVikalp Bhalia
 
Mule exception strategies - Choice Exception Strategy
Mule exception strategies - Choice Exception StrategyMule exception strategies - Choice Exception Strategy
Mule exception strategies - Choice Exception StrategyAnkush 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 esbVishnuAnji
 
Exception Handling in UiPath.pptx
Exception Handling in UiPath.pptxException Handling in UiPath.pptx
Exception Handling in UiPath.pptxApurbaSamanta9
 

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 (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

Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
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
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony 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
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
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
 
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
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 

Recently uploaded (20)

Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
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
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony 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
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
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
 
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
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 

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