Atomic scope may not contain Receive that follows correlation set initialized inside scope

by eliasen 5. april 2010 14:04

Hi all

At times you may run into this error at compile time: “an atomic scope may not contain a receive with a correlation filtration initialized in the same scope”. Not very many posts exist on this topic so I thought I’d just share some thoughts on it.

First of all, the error occurs because you have a Receive shape inside an atomic scope and this Receive shape follows a correlation set that is initialized within the same scope. This is not allowed, as explained here: http://msdn.microsoft.com/en-us/library/aa560115(BTS.10).aspx.

The reason for this limitation is, that everything that happens inside the Atomic scope is not committed until the Scope shape finishes processing. If you at some point initialize a correlation set inside the Atomic scope, then the subscriptions for any Receive shapes that follow this correlation set cannot match the properties from the correlation type because the routing engine cannot know about the values until the Atomic transaction is committed.

If you actually could follow a correlation set that is initialized within the same Atomic scope you would end up in a deadlock because:

  1. The instance subscription is not created until the transaction commits
  2. The transaction does not commit until the Receive shape has its message

So as you can see, the Receive shape would never get a message and therefore the transaction would never commit.

Hope this helps someone out there.

--
eliasen

Tags:

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading

About the author

Jan Eliasen is 37 years old, divorced and has 2 sons, Andreas (July 2004) and Emil (July 2006).

Jan has a masters degree in computer science and is currently employed at Logica Denmark as an IT architect.

Jan is a 6 times Microsoft MVP in BizTalk Server (not currently an MVP) and proud co-author of the BizTalk 2010 Unleashed book.

BizTalk Server 2010 Unleashed


Buy from Amazon

Microsoft MVP


6 times: July 2004, July 2008, July 2009, July 2010, July 2011, and July 2012. Not currently an MVP.

MCTS

Image to show

Month List

Page List