title: Mule retry using until successful scope during external webservice call if the service is down
body: <p>I am facing problem with until successful scope , the use-case as follows</p>
  
  <p>mule flow contains:
  inbound : http endpoint</p>
  
  <p>outbound: http outbound calling external web service </p>
  
  <p>i designed flow such that i defined my external web service call inside until successful scope, the requirement is that, retries need to happen if external service is down and should stop retry in between when the service is up and running</p>
  
  <p>I couldn't achieve it.</p>
  
  <p>Required inputs how i can acheive it and also the correct failureExpression need to be define for untillsuccessful scope.</p>
  
  <p>Mule version(3.5.1) - Anypoint Studio - July 2014</p>
  
  <p>Config:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;until-successful
      maxRetries="3"
      doc:name="Until Successful"
      millisBetweenRetries="5000"
      failureExpression="#[exception.causedBy(java.net.ConnectException) ||
          exception.causedBy(java.net.SocketTimeoutException) ||
          exception.causedBy(java.net.SocketException)]" synchronous="true"&gt;
      &lt;http:outbound-endpoint exchange-pattern="request-response"
          method="POST" address="http://localhost:8088/mockPriceSoapBinding"
          doc:name="HTTP" mimeType="text/html" tracking:enable-default-events="true" /&gt;
  &lt;/until-successful&gt;
  </code></pre>