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.

Advertisements

About Naushad Alam
I am a BizTalk developer/administrator/designer/architect with over 9 years of experience. Currently I am living in UK and working with one of the largest bank as a Senior BizTalk Consultant. I believe in sharing my experience with others and learn more while helping or solving others problem.

2 Responses to How To Promote MQ Services Context Properties in BizTalk

  1. Shah MOHAMOD says:

    Hi Naushad,

    I intend to use a dynamic send port to route messages to an MQS server. In so doing, I’ll be using properties like “MQMD_Report” in the message construction in my orchestration. I would like to avoid hardcoding values for MQS properties in my orchestration.

    Do you know any DLL which I need to reference in order to have the list of available values for the MQS adapter properties ?

    Thanks.
    Shah

  2. Shah Mohamod says:

    Hi Naushad,

    I have tried the solution you have proposed but it’s not working for me. I’m not seeing the promoted property in the context properties of my BizTalk send port. This send port is using the XmlTransmit pipeline. We are using BizTalk 2013 R2. Any clues from your behalf will be greatly appreciated.

    Thanks.
    Shah

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: