How To Promote MQ Services Context Properties in BizTalk

Recently there was a requirement in my BizTalk solution to Promote “MQSeries.MQMD_Expiry” message context property to a outgoing message. At the starting I thought it is quite easy because BizTalk support and promotes most of the system properties of MQ Services in MQ adapter.

I was able to view this property at send port but I was not sure how will I set a value to this property in orchestration.

If I list all the filter properties on send port I can see this property.

1-9-2011 6-57-44 PM

In The Orchestration

When I tried to get the same property in orchestration I could not find it.That is really strange!!.

1-9-2011 7-03-11 PM

It was quite strange for me to see that this context property is available on send port while not in orchestration. Then I figured out from admin console the assembly which contains the property schema for MQ Series.

1-9-2011 7-05-33 PM

I added the reference of this dll to my orchestration and yes now I could see this property in orchestration

1-9-2011 7-09-46 PM

1-9-2011 7-12-45 PM

At this I was able to set the value of this property. Now the next step was to promote this property .

Correlation Set and Correlation Value

Yes I have to create a correlation set and a correlation value so that it can be initialized at send port. This is the trick here, other wise this context property will be written but not promoted.

Created  a correlated type and selected MQSeries.MQMD_Expiry property

1-9-2011 7-18-27 PM

Created a Correlation Set and set the correlation type to above created correlation type variable.

Click on Send Port and open properties and select the Correlation Set in the “Initialize Correlation Set ” property box.

1-9-2011 7-21-48 PM

With this the exercise gets completed. I tested a sample message and yes I could see it promoted.

I know this is quite simple but Ii found it interesting.

BizTalk HotRod Jan 2011 edition is out

I always like reading HotRod editions. The latest one for Jan 2011 is out , It is available at

There are really good articles in this edition.