Thursday 11 July 2013

Fault Framework : Sync Process vs Async Process

I've dealt with many cases with SOA fault framework where the customer claims that scheduled recoveries don't work.
As an example :
Sync BPEL1 invokes Sync BPEL2.BPEL2 throws a fault and BPEL1 has fault policies defined as follows :
<faultName>
    <condition>
    <action ref="ora-retry"/>
    </condition>
</faultName>

<Action id="ora-retry">
        <retry>
          <retryCount>3</retryCount>
          <retryInterval>10</retryInterval>
          <exponentialBackoff/>
          <retryFailureAction ref="send-notification"/>
          <!-- retrySuccessAction ref="ora-errorQ"/ -->
        </retry>
</Action>

The expectation is that during fault handling , the framework should kick in and perform a retry thrice.However no retries are performed.


EXPLANATION:
------------------- The exhibited behavior is expected. Fault Frameworks works for asynchronous invocations only.
 (i.e) The caller BPEL should be asynchronous

 Sync Invocations request and wait for the response (response could be faults)  on the same thread (say Thread A),while Fault framework takes action on a new  thread(Thread B)

 The solution would be to use an Async BPEL processes.

1 comment: