Friday, January 17, 2014

Property Promotion inside Orchestration


Properties get promoted within BizTalk at different places, Example: some of the properties gets promoted by Adapters, Pipelines Components, Messaging Engine, etc.

    In custom pipeline components, developers can use either IBaseMessageContext.Write to write context properties or IBaseMessageContext.Promote to promote context properties. The basic difference between writing and promoting properties are, properties that are written cannot be used for message routing, whereas properties that are promoted can be used for message routing.

Below is the sample for promoting properties within Orchestration is:
    MSG_OUT(ProjectNameSpace.PropertySchema.PropertyName) = "XXX"

If we look at the outgoing message context, the above prompted property will not promote and it would be in the "NotPromoted" state.


Please follow the below instructions to promote your property within the orchestration:

    In BizTalk we have a Correlation concept, basically which routes the response messages to the correct running orchestration instance that initiated the request message. Within Orchestration we use Correlation Set and Correlation type to archive this type of instance routing.

Correlation type is nothing but a set of Properties and Correlation Set is based on Correlation type and its a set of properties with specific values. When we "Initialize a Correlation set" within orchestration, the orchestration instance automatically promotes those properties in Correlation set into the message context.

We can use this mechanism to promote properties and there is no need to do a follow up of the Correlations sets we initialized, and it NOT going to create unnecessary subscriptions.

1 comment: