My blog has moved!

Visit http://blog.adamroderick.com/ and update your bookmarks.

Wednesday, April 25, 2007

Error: "A correlation may be initialized only once"

I have seen this error in two situations.

1. You have two receive or two send shapes that both initialize the same correlation set. This one is easy to figure out. In my case, I have two points in a single orchestration where I wanted to send a reject message to the same port. I ended up naming the correlation set for the first send shape "rejectProperties" and the second "rejectProperties2," and both were of the same correlation type.

2. The second situation was not intuitive. My send shape was in a loop, and the compiler interpreted that to mean that there was the potential of initializing the correlation set for that send shape multiple times. The way around this was to put my send shape in a scope (I used a non-transactional scope). I then created the correlation set as local to the scope rather than on the global orchestration level.

Labels:

1 Comments:

Anonymous Anonymous said...

Hi Adam! The second solution was just what I looking for. I have a dummy correlation set on a send shape to make some properties to be promoted. I "repost" my message to the message box to see if its "parent message" is on its way.

September 29, 2008 at 4:06 AM  

Post a Comment

Subscribe to Post Comments [Atom]

<< Home