What is error or fault?
We say there is error or Fault means when we didn’t receive expected response.
How many types of faults we can have in SOA Suite tool?.
We categories fault into 2 categories.
1. Business Faults
2. Technical Faults
What is Business Fault?
As the name suggest, these faults related to business scenarios. These errors are thrown explicitly in code by us. E.g. we have written the functionality to do card validation but do card number check if card number comes blank then we throw business fault and reply back to user with same response.
What is Technical Fault?
Faults other than business faults known as technical faults. There may be many reasons for these technical faults like code break, connectivity error, Invalid message etc. But mostly we receive connectivity errors under technical faults.
Can we define our own faults?
Yes, we define our own faults in SOA Suite tool, we generally created fault for business fault scenario where we explicitly throw error.
What steps we need to follow to create custom error?
We need to follow below steps to generate custom error.
1. Define XML structure for fault message.
2. Create message based on that XML structure in WSDL.
3. Associate that message in WSDL operation.
Which activity we use to throw business fault in BPEL?
We use throw activity to throw business fault.
What is difference between Remote and Binding fault?
We receive remote fault when we have connectivity issue while connecting to reference systems/applications. We receive binding fault preparation of the invocation fails. For example, the WSDL of the process fails to load. A binding Fault is not retryable. This type of fault usually must be fixed by human intervention.
How we can handle faults in SOA Suite tool?
We can handle faults by 2 ways in SOA Suite tool.
Using Catch & CatchAll blocks
Using Fault Handling Framework
How catch & CatchAll blocks work?
We use these blocks to handle the fault in BPEL component. We can’t use these blocks in other components to handle the fault. We can apply these blocks to main BPEL process or we can also apply at scope level as per our requirement.
What is the difference between Catch & CatchAll block?
Following are the difference between 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.
Which function we use to get Fault Name and Fault description in CatchAlll block?
We use ora:getFaultName() to get fault name and ora:getFaultAsString() function to get fault description in CatchAll block.
What is Fault Handling framework?
Oracle SOA Suite provides generic (common, standard) fault management framework to handle the faults. We use this framework to handle the fault that occurs during invocation time.
What is the difference between Catch blocks and Fault Handling Framework?
Following are the difference between these two.
Catch & 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 3 BPEL templates (Sync, Async, Oneway).
Fault Handling Framework
1. We use this framework only to handle invocation faults; we can’t use this framework to handle all types of fault.
2. This can be used for BPEL as well as Mediator component.
3. We should use this only for 2 BPEL templates (Async and OneWay).
How 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.
Where we keep these two fault-polic.xml and fault-binding.xml files?
We keep these files either local to our project or in MDS. We need to specify the path of these files in composite.xml file when we keep these files in MDS.
Can we define more than one policy in fault-policy.xml file?
We can have more than one policy in fault-policy.xml file and each policy will have its unique id.
What all actions we have in fault-policy.xml file?
We have following actions in fault-policy.xml file.
1. Retry
2. Human Intervention
3. Terminate
4. Java call
5. Replay
6. Rethrow
How we handle errors in mediator component?
We use fault handling framework to handle fault in mediator as in mediator we get only one type of fault.
What is file rejection handler?
File rejection handler is used to handle rejected file while performing polling.
What all types of rejection handlers we have?
We have following types of rejection handler in SOA Suite tool.
1. Web Service Handler
2. Custom Java handler
3. Queue handler
4. File Handler
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.
Which function we use to get Fault Name and Fault description in CatchAlll block?
We use ora:getFaultName() to get fault name and ora:getFaultAsString() function to get fault description in CatchAll block.
What is Fault Handling framework?
Oracle SOA Suite provides generic (common, standard) fault management framework to handle the faults. We use this framework to handle the fault that occurs during invocation time.
What is the difference between Catch blocks and Fault Handling Framework?
Following are the difference between these two.
Catch & 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 3 BPEL templates (Sync, Async, Oneway).
Fault Handling Framework
1. We use this framework only to handle invocation faults; we can’t use this framework to handle all types of fault.
2. This can be used for BPEL as well as Mediator component.
3. We should use this only for 2 BPEL templates (Async and OneWay).
How 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.
Where we keep these two fault-polic.xml and fault-binding.xml files?
We keep these files either local to our project or in MDS. We need to specify the path of these files in composite.xml file when we keep these files in MDS.
Can we define more than one policy in fault-policy.xml file?
We can have more than one policy in fault-policy.xml file and each policy will have its unique id.
What all actions we have in fault-policy.xml file?
We have following actions in fault-policy.xml file.
1. Retry
2. Human Intervention
3. Terminate
4. Java call
5. Replay
6. Rethrow
How we handle errors in mediator component?
We use fault handling framework to handle fault in mediator as in mediator we get only one type of fault.
What is file rejection handler?
File rejection handler is used to handle rejected file while performing polling.
What all types of rejection handlers we have?
We have following types of rejection handler in SOA Suite tool.
1. Web Service Handler
2. Custom Java handler
3. Queue handler
4. File Handler