Error Handling about catch and catch all block

Catch & CatchAll block

Catch block

1. This is used to handle specific fault
2. Store fault information in fault variable
3. We can add more than one Catch block in one BPEL process.

CatchAll block

1. This is used to handle any type of fault.
2. We need to use functions to get the fault details.
3. We can add only on CatchAll block in one BPEL process.


Function we use to get Fault Name and Fault description in CatchAll block

We use

ora:getFaultName() to get fault name 
ora:getFaultAsString() function to get fault description 

Fault Handling framework

Oracle SOA Suite provides generic fault management framework to handle the faults. We use this framework to handle the fault that occur during invocation time.


Catch blocks and Fault Handling Framework

CatchAll Blocks
1. We use Catch & CatchAll block to handle all types of error.
2. These can be used only for BPEL component.
3. We can use this for all BPEL templates (Sync, Async, Oneway).


Fault Handling Framework

We use this framework only to handle invocation faults; we can’t use this framework to handle all types of fault.
This can be used for BPEL as well as Mediator component.
We should use this only for two BPEL templates (Async and OneWay).


Fault Handling Framework works:

Fault Handling Framework is based upon two files.


Fault-policy.xml: This file is used to define one or more fault policies with conditions and actions.


Fault-binding.xml: This file is used to associates a policy with a composite, component or reference.


All actions we have in fault-policy.xml file

Retry
Human Intervention
Terminate
Java call
replay
rethrow

How to handle errors in mediator component
We use fault handling framework to handle fault in mediator.

File rejection handler
File rejection handler is used to handle rejected file while performing polling.


Types of rejection handlers :

Web Service Handler
Custom Java handler
Queue handler
File Handler

Comments

Post a Comment

Popular posts from this blog

Interview question for File and FTP Adapter

What is boot.properties file and how to create

SSL Exceptions in Admin Server and Node Manager.