| Author |
Custom Compensation isn't invoked!
|
|
| RKrishna 2005-03-17, 8:46 pm |
| I have a scope which has a custom compensation. My scope has a timeout value
and after the timeout the custom compensation should be called but it never
does.
Transaction is 'long running'.
Is this a bug as I have seen this issue mentioned somewhere else. Thanks.
| |
| Jon Flanders[DevelopMentor] 2005-03-17, 8:46 pm |
| 1) Compensations are only called when the transaction succeeeds - but the
outer scope thinks it should roll back. So you are wrong to think that the
compensation will be called when the timeout happens. In fact - if the
transaction fails - the compensation will *never* be called.
2) Custom compensations aren't called automatically. In order for a scope's
compensation to be called, an outer scope has to have its compensation
called (for default compensations) or the outer scope must decide something
is wrong - throw an exception and call the inner scope's compensation block
from inside of an exception.
--
Jon Flanders [DevelopMentor]
http://staff.develop.com/jfland/
http://www.develop.com/courses/biztalk
"RKrishna" <RKrishna@discussions.microsoft.com> wrote in message
news:8AB51C89-C795-426C-97D0-32B8FB834684@microsoft.com...
>I have a scope which has a custom compensation. My scope has a timeout
>value
> and after the timeout the custom compensation should be called but it
> never
> does.
>
> Transaction is 'long running'.
>
> Is this a bug as I have seen this issue mentioned somewhere else. Thanks.
| |
| RKrishna 2005-03-17, 8:46 pm |
| Thank you very much. Of course it makes sense now 
I got around the problem by using a Listen shape instead. That way I am able
to handle the timeout as well as Receive a file, whichever comes first.
"Jon Flanders[DevelopMentor]" wrote:
> 1) Compensations are only called when the transaction succeeeds - but the
> outer scope thinks it should roll back. So you are wrong to think that the
> compensation will be called when the timeout happens. In fact - if the
> transaction fails - the compensation will *never* be called.
> 2) Custom compensations aren't called automatically. In order for a scope's
> compensation to be called, an outer scope has to have its compensation
> called (for default compensations) or the outer scope must decide something
> is wrong - throw an exception and call the inner scope's compensation block
> from inside of an exception.
>
>
>
> --
> Jon Flanders [DevelopMentor]
> http://staff.develop.com/jfland/
> http://www.develop.com/courses/biztalk
> "RKrishna" <RKrishna@discussions.microsoft.com> wrote in message
> news:8AB51C89-C795-426C-97D0-32B8FB834684@microsoft.com...
>
>
>
|
|
|
|