This discussion is archived
0 Replies Latest reply: Sep 3, 2013 4:49 AM by user12860269 RSS

Webservice Retries

user12860269 Newbie
Currently Being Moderated

Here's my scenario:

 

1. BPELApplicationA : Exposed sync SOAP service. It's a BPEL process, based on the payload it calls external web services. Based on the successful call to external web service it generates FAIL or SUCCESS response for the exposed service.

2. BPELApplicationB : Again it's a BPEL process but it's polling from an Oracle table and calling the BPELApplicationA. If it receives FAIL response from BPELApplicationA it's updating an error table via db adapter.

 

So BPELApplicationB calls BPELApplicationA  which in turns calls external web services.

 

Now when the BPELApplicationA calling the external web service and for some reason the web service is down or unavailable I want to do 3 retries. Even after that it doesn't succeeds then it should fall into

catchAll (which I have added), that in turns generates the FAIL response for the SOAP service.

 

 

I have this fault handling policy attached to BPELApplicationA.

 

 

fault-bindings.xml

<?xml version="1.0" encoding="UTF-8"?>

<faultPolicyBindings xmlns="http://schemas.oracle.com/bpel/faultpolicy" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0.1">

    <reference faultPolicy="RKWSTestPolicy">

       <name>ExternalServiceNameAAA</name>

    </reference>

</faultPolicyBindings>

 

fault-policy.xml

 

<?xml version="1.0" encoding="UTF-8"?>

<faultPolicies xmlns="http://schemas.oracle.com/bpel/faultpolicy">

  <faultPolicy xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"

               xmlns:xs="http://www.w3.org/2001/XMLSchema"

               xmlns="http://schemas.oracle.com/bpel/faultpolicy"

               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

               version="2.0.1"

               id="RKWSTestPolicy">

    <Conditions>

      <!-- remote fault processing here: -->

      <faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension" name="bpelx:remoteFault">

        <condition>

          <action ref="ora-retry"/>

        </condition>

      </faultName>

      <!--binding fault processing here: -->

      <faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension" name="bpelx:bindingFault">

        <condition>

          <action ref="ora-retry"/>

        </condition>

      </faultName>

    </Conditions>

    <Actions>

      <!-- RetryInterval is in seconds -->

      <Action id="ora-retry">

        <retry>

          <retryCount>3</retryCount>

          <retryInterval>60</retryInterval>

          <exponentialBackoff/>

          <retryFailureAction ref="ora-rethrow"/>

        </retry>

      </Action>

      <Action id="ora-rethrow">

        <rethrowFault/>

      </Action>

   </faultPolicy>

</faultPolicies>

 

Now I expected that after the retries it will fall into the catchAll which in turn will generate a FAIL response. BPELApplicationB upon receiving the fail response will update the error table and all the instances will be successfully completed.


The issue I have is that in BPELApplicationA after the retries its not going to the catchAll at all. After the rerties its gets faulted, when I look at the trace it says invoke (for the external web service) still pending. BPELApplicationB is not receiving the fail response and it gets faulted as well. Error table doesnt gets updated. Even in BPELApplicationB it doesnt go to the catchAll block. Instances in both the applications are faulted.

 

What I am doing wrong? Any ideas?

 

Thanks for the help in advance.



Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points