This discussion is archived
3 Replies Latest reply: Nov 7, 2012 9:29 PM by 878605 RSS

Fault Policy - Different Retry Times

Kevin King Journeyer
Currently Being Moderated
I'd like to retry a fault 3 times at a 30 second delay, call some java code, then if still faulted, retry 10 times at a much higher interval (ie, 2 hours)...

(11.1.1.3 - BPEL)

Here is an excerpt from the fault-policies.xml
<Action id="test-action">
  <retry>
    <retryCount>1</retryCount>
    <retryInterval>10</retryInterval>
    <retryFailureAction ref="log-action" />
  </retry>
</Action>
<Action id="log-action">
  <javaAction className="soa.fault.handler.LoggingFaultHandler"
  defaultAction="test-action2" />
</Action>
<Action id="test-action2">
  <retry>
    <retryCount>10</retryCount>
    <retryInterval>1</retryInterval>
    <retryFailureAction ref="ora-rethrow-fault" />
  </retry>
</Action>
The problem I have, is all the retries are going by the first 'retryInterval'.... Has anyone been able to get different retry intervals to work?

-Kevin

Edited by: Kevin King on Sep 21, 2011 8:56 AM
  • 1. Re: Fault Policy - Different Retry Times
    744168 Newbie
    Currently Being Moderated
    How about

    <Actions>
         <Action id="ora-retry">
              <!-- RETRY on 30, 60, 90 seconds -->
              <retry>
                   <retryCount>3</retryCount>
                   <retryInterval>30</retryInterval>
                   <exponentialBackoff/>
                   <retryFailureAction ref="custom-ora-retry"/>
              </retry>
         </Action>
         <Action id="custom-ora-retry">
              <!-- RETRY on 60, 120, 180 minutes etc -->
              <retry>
                   <retryCount>6</retryCount>
                   <retryInterval>3600</retryInterval>
                   <exponentialBackoff/>
                   <retryFailureAction ref="ora-rethrow-fault"/>
              </retry>
         </Action>
         <Action id="ora-rethrow-fault">
              <rethrowFault/>
         </Action>
    </Actions>


    Regards,
    Sarat

    Edited by: sarat.gutha on 21-Sep-2011 09:42
  • 2. Re: Fault Policy - Different Retry Times
    Kevin King Journeyer
    Currently Being Moderated
    Thats essentially what I have... the first retry calls the 'log-action' (on failure), then the default action of that is my 'test-action2' which is the second retry...
  • 3. Re: Fault Policy - Different Retry Times
    878605 Newbie
    Currently Being Moderated
    Hey Kevin, I need to implement same thing in my use case. We need to have 2 different retry interval of 3 mins and 5 mins. I have created a logic like below:

    <condition>
                        <action ref="ora-retry_1"/>
    </condition>
    </faultName>
              <faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension" name="bpelx:remoteFault">
    <condition>
                        <action ref="ora-retry_2"/>
              </condition>
              </faultName>
    .....
    <Actions>
    <Action id="ora-retry_1">
    <retry>
    <retryCount>60</retryCount>
    <retryInterval>180</retryInterval>
                   <exponentialBackoff>1</exponentialBackoff>
    </retry>
    </Action>
              <Action id="ora-retry_2">
                   <retry>
                        <retryCount>80</retryCount>
                        <retryInterval>300</retryInterval>
                        <exponentialBackoff>1</exponentialBackoff>
                   </retry>
              </Action>

    But while testing this, I have created a use to first give business fault for first 2 time, and then remote fault. But actually, I am getting irregular patterns. retry interval is varying for remote fault once it is 5 mins, other time it is 10 mins, then 20 mins .

    Any idea how we implement different retry interval in same fault policy xml.

    thanks,
    rps

Legend

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