Real-life experiences gained on cutting edge BizTalk projects from the City of London.

Wednesday, December 15, 2004

Useful retry pattern

Reading a ‘Suspended (Not Resumable)’ status for a critical $20M financial transaction is not really the best thing you can wake up to. I’ve woken up to a few in my time, and trust me: this one is particularly unpleasant…

There are a number of reasons it can happen, but where orchestrations are concerned, it generally means that an exception has occurred that hasn’t been gracefully handled.

Although in theory, this can happen anywhere in your orchestration, there are key points that it will happen more than most, and if you protect yourself in these scenarios, you’ll be able to sleep a little easier. Common scenarios that could generate an error are:

  • Calling into to the Rules Engine to execute a Policy – if the Rule Engine Update Service is not running (why does this never start on my laptop??), or the rule engine runs code that has an exception
  • Sending a message to a destination that may sometimes be unavailable (that’s pretty much all destinations!)
  • Executing some .NET code that could go wrong for an infrastructure reason (e.g. database server is down)

All these scenarios are related to infrastructure problems. They’re problems that if you fix the infrastructure and resume the orchestration, then everything should continue as if nothing ever happened.

In these situations, a good way of dealing with it is to execute some retry logic by gracefully putting the orchestration into a Suspended mode and allowing an administrator to resume the orchestration once the infrastructure problem has been resolved.

It’s pretty simple to achieve via nested scopes. Wrap the potentially risky operation in a set of shapes that together form a reusable retry pattern:

Essentially, the pattern requires that the risky operation is encapsulated within a loop shape, which in turn has a non-transactional scope with an exception handler that traps the possible error conditions. If an exception occurs, a String variable and Boolean variable is set that is then used outside the non-transactional scope to determine whether to gracefully Suspend, and to write out a meaningful reason for the suspension. The administrator will get an alert that warns that an instance has been suspended. He can then resolve the problem (e.g. start the Rules Engine Update Service) and then use HAT to resume any orchestration instances. Simple…

Once I’ve worked out how to upload pictures of orchestrations, I’ll post a picture which will make it easier to understand!

One extra issue is that if you’re using this pattern when sending messages and the message fails to be transported, the message to be sent will also go into a Suspended (Resumable) state. If the administrator resumes both the Orchestration service instance and the Send service instance, you will send the same message twice. To work around this problem, you can use delivery notifications and a Nack Handler to automatically clean-up the send service instances, but that’s a subject for another day…

10 Comments:

Anonymous Anonymous said...

Hi Ian,

Can you please send me the sample for this retry logic in case of system issues?

This is a bit urgent request. Kindly help.

Thanks,

Satish

10:25 AM

 
Blogger RealBiztalker said...

I think the explanation should be enough to build the sample.
Thanks
RealBizTalker

10:48 AM

 
Anonymous Anonymous said...

Your article is very informative and helped me further.

Thanks, David

7:10 PM

 
Anonymous Anonymous said...

Hey guys, there's another English person about, :)
I'm a new on realbiztalk.blogspot.com
looking forward to speaking to you guys soon

4:21 PM

 
Anonymous Anonymous said...

lolita chin
lolitas 13
lolitas kid
free anal sex
lolita picture
lolita suck
lolita cp terra loltobbs ftp lol
lolita vip lolitas virgins bbs
lolita lolly fuck movie children
lolita chin
lolitas 13
lolitas kid
free anal sex
lolita picture
lolita suck
lolita cp terra loltobbs ftp lol
lolita vip lolitas virgins bbs
lolita lolly fuck movie children

2:23 AM

 
Anonymous Anonymous said...

norwegian cruise line

6:39 PM

 
Anonymous Anonymous said...

I gathered a couple of pillows and put them under my head and chest and raised my butt up.
It didn't take us long to get into position and he was soon sliding himself into me very slowly.
He was right, his ukraine top child was touching some places it missed when we did it with him lying on top of me.
When he had himself buried he began long slow thrusts while pulling me back to him with a hand on each of my hips.
A few minutes of that and he let one hand go and reached around and gently massaged a nipple.
Between his young model driving deep inside of me and his fingers on my breast I knew I was going to explode quickly. "Don, I'm going to preteen model
"Honey, see if you can hold back a bit and maybe we can puss pedo at the same time.""I'll try."
I felt him stroking the shaft of his lolita while the head was in me and moving it in and out of me ever so slowly.
I could see what he was doing.
He was getting himself aroused with jacking himself off with only part of his preteen bbs in me so he could try and free teen porn at the same time as I would.
I could feel the heat rising in me and I threw my ass back at him and drove his preteen sample video all the way in as I felt my orgasm come over me. "Don I'm coming."

2:58 PM

 
Anonymous Anonymous said...

viagra online prescription

2:33 PM

 
Anonymous Anonymous said...

Hi Real BizTalker,

Thanks. This article has got me started on the Retry Pattern for Suspend shape. However, a sample source would have helped.

4:34 PM

 
Anonymous Anonymous said...

Guy
You have got to see this. Obama playing on XBox. Funniest video ever. http://bit.ly/bllhx1

2:42 PM

 

Post a Comment

<< Home