Re: Retry on certain exceptions?
- From: "Jeremy Chapman" <please@Idontlikespam>
- Date: Tue, 20 Jun 2021 13:27:46 -0700
That's an interesting solution to try. Thanks. If the web service fails
because of a sql exception, I'll end up getting a bunch of suspended
messages in the messagebox for each retry though right? And if i get my
custom exception I'll end up with 1 suspended message. My ideal scenario
would be no suspended messages if the web service throws my custom exception
(a handled error), and 1 suspended message if it's a sql error (or unhandled
exception).
"Matt Meleski" <MattMeleski@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:13AF24B4-1345-476E-8FDD-80A9DA0CCCA4@xxxxxxxxxxxxxxxx
A way to approach this is to build your own Retry Pattern in
your orchestration to call the Web Service. Therefore:
1) for you Soap Send port set the Retry property to zero.
2) In your orchestration, then add a loop shape. Within that loop shape,
add
your existing shapes to call the Web Service -> with the Exception blocks.
Your Expression for you loop shape would be something like
intCounter <= intAllowedRetryAttempts && blnContinueLoop
Before your loop shape you would initialize your variables to something
like:
intCounter = 1;
intAllowedRetryAttempts = 3;
blnContinueLoop = true;
In the loop shape,after successfully calling your Web Service, you would
set :
blnContinueLoop = false;
In your custom exception block set :
blnContinueLoop = false;
In your sql Exception block:
intAllowedRetryAttempts = intAllowedRetryAttempts + 1;
You could also use a delay shape to delay a certain interval between
the next retry.
Matt
"Jeremy Chapman" wrote:
I have an orchestration which calls a web service. The send port is set
to
rety 3 times, once every 1 minute. I've got a scope with a catch around
the
send shape for additional workflow if the web service call fails. My
web
service parses the some text and makes some sql calls. If the sql calls
fail I want the orchestration to continue retrying which is the default
behaviour, but I also have parsing logic in the web service which throws
some custom exception if the data can't be parsed. If these custome
exceptions are thrown, I don't want the orchestration to retry the send
port. Is this possible to do?
.
- Follow-Ups:
- Re: Retry on certain exceptions?
- From: Matt Meleski
- Re: Retry on certain exceptions?
- References:
- Retry on certain exceptions?
- From: Jeremy Chapman
- Retry on certain exceptions?
- Prev by Date: UBL and BizTalk Maps
- Next by Date: Re: Creating SOAP
- Previous by thread: Retry on certain exceptions?
- Next by thread: Re: Retry on certain exceptions?
- Index(es):
Relevant Pages
|