4 Replies Latest reply on Sep 4, 2013 7:24 AM by RakeshKr

    Webservice Retries


      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.




      <?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">







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

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

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







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

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


                <action ref="ora-retry"/>



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

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


                <action ref="ora-retry"/>





            <!-- RetryInterval is in seconds -->

            <Action id="ora-retry">





                <retryFailureAction ref="ora-rethrow"/>



            <Action id="ora-rethrow">






      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.

        • 1. Re: Webservice Retries

          What error is captured when BPELApplicationA calls the external web services? Does the error fall under remoteFault?

          bindingFault is not retryable, so the retry action may not be applicable if the web service invocation ends in bindingFault.

          • 2. Re: Webservice Retries

            The error falls under remoteFault when the web service call fails. If I remove the fault handler, it goes to the catchAll but not when the fault policies are attached.


            I want to do the retries then rethrow the fault so that it goes to catchAll where I can use the reply activity to return a FAIL response.

            • 3. Re: Webservice Retries

              Hi, If you change the fault policy, you must redeploy the SOA composite application that includes the fault policy.


              Did you perhaps add the retryFailureAction later and not redeploy the composite so the fault policy update can take effect?


              Validation of fault policy files is done during deployment.

              • 4. Re: Webservice Retries

                Hi, I did redeploy after every change. I am aware that it will not take any effect without redeploying. Just to be 100% sure I exported the composite from OEM, verified that all the changes are correctly deployed.