vrijdag 13 juli 2012

Promote using Correlation initialisation inside a loop

I assume you already know how to promote properties when sending a message from an orchestration to the messagebox.
This can of course be achieved by initializing a correlation set with containing all context properties you like to promote. But that 's not why I'm posting this blog. If you need more info on how to promote properties from an orchestration I'll refer you to this blog.

Problem

The problem is when you try to do this from a send shape inside a loop, you'll get an error when building the project in visual studio.
The received error is "Correlation set may be initialized only once".

Solution

The solution to this issue is actually real easy. All you have to do is create a scope inside the loop. And place the send shape (and even other shapes if needed) in the created orchestration. The benefit of the orchestration is that you can define the correlation set on the scope itself (instead of as a global correlation set).
Now can initialize your correlation set on your send shape inside the scope.

And that's all you'll have to do!! It really is that easy! :)

Geen opmerkingen:

Een reactie posten