Promoting Properties Inside an Orchestration

This is one of those BizTalk tricks that I don’t use very often so I
have to look it up. This post will serve to document it for future

Recently I was working on a project where we needed to set the promoted
properties used by the ESB Toolkit from inside an orchestration.
While it is easy to set the value of a context property inside an
expression shape, the property won’t be promoted for routing once the
message leaves the orchestration. The workaround is to use a correlation
set to promote the newly set values to the message context. This can be
accomplished in three easy steps.

First, create a correlation type with the context values you want
promoted. (You may need to add a reference to an assembly if you don’t
see the properties in the list) Next, create a correlation set using the
previously created correlation type. Finally choose the correlation set
as the initializing correlation set on the send port for your message.
Now the message context values you set will be promoted and can be used
for routing.

For a longer explanation of how this works, check out “Property
Promotion inside Orchestration
“ by Saravana Kumar.