How to handle BPEL fault

2019-09-06 20:02发布

问题:

How to handle fault in BPEL (SOA 11.1.1.4). I have a BPEL process the inputs are as 3 Strings input and one Array of a Employee class.

Now I want to put validation as inputs can not be null. then how to do fault handling for this. everytime i am facing Selection failure Exception.

One way to achieve this I should the validation before invoking the BPEL.

how i can handle this inside the process.

I am using SOA 11.1.1.4 and JDeveloper 11.1.1.4

回答1:

You don't state if you are using BPEL 1.1 or BPEL 2.0 processes. In BPEL 1.1 adding an exception handler for the SelectionFailure exception will work.

In BPEL 2.0 you need to add a catch all as there appears to be a bug in the handling of specific faults.

If you also are using Oracles BPEL Fault Management framework then you need to add a new test condition for selectionfailure errors and have it's action method execute an ora-rethrow action for this particular error



回答2:

Alternatively, you could modify the wsdl so that the XML won't permit nulls and then turn on schema validation.

If you want to handle it inside the process, check it with an assign and use a catch block on the scope to trap the error and set the parameters for a wsdl fault.



标签: soa bpel