Disable Apache ODE’s Activity Recovery If Process Follows Request-Response Style
by Milinda Lakmal
Most of the time business process are long running and implemented in asynchronous style. But there may be situations that we are using synchronous business process which are not long running. So client expect a response back from the server without a time out. This response can be a SOAP fault. The main thing is, clients must get a response back even process failed during execution.
Apache ODE has this nice feature called activity recovery support for BPEL invoke activities. If external service invoke failed due to unavailability of end point, due to a SOAP fault or domain name resolution error, user can retry this activity after the errors in external services are fixed.
If the process operations are synchronous, client will get time out error if invoke activity failed during execution in normal case. This not good thing for synchronous operation. Client must get a fault as a response if invoke activity failed during synchronous operation. So you if your process operations are synchronous and you need fault reponse if invoke activity failed during process execution, you need to disable activity recovery feature and set fault on failure to true. This can be done using following code snippet in a BPEL scope which has invoke activity.
<ext:faultOnFailure>true</ext:faultOnFailure>
</ext:failureHandling>
Here is a sample BPEL process that use the above feature.