I have two BPEL processes on WSO2 BPS 3.5.1. Process A calls process B. Process B calls a service in WSO2 ESB that can throw a fault. If the ESB service throws a fault, process B catches it and throws a different fault. Now, I want to catch the fault thrown by process B in process A, make a slight adjustment to the message included with the fault and rethrow it.
I have no problem catching the specific fault thrown by the ESB service in process B. However, I am not able to catch the fault thrown by process B in process A. The BPEL editor lets me select the fault and its namespace for the catch activity, but the fault is never caught. However, a catchAll is able to catch the fault. I see no difference in the way the faults are declared in the WSDL of the ESB service and the WSDL of process B.
Because I need to be able to examine the fault returned by process B, using a catchAll is not sufficient for my needs. I have seen a response on stack overflow that talks about using catchAll and a flag, but it is not clear to me what is meant by this "flag".