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.
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: biztalk