Feed Icon  


  • Bryant Likes
  • Send mail to the author(s) E-mail
  • twitter
  • View Bryant Likes's profile on LinkedIn
  • del.icio.us
Get Microsoft Silverlight
by clicking "Install Microsoft Silverlight" you accept the
Silverlight license agreement

Hosting By

Hot Topics


Open Source Projects




Posted in BizTalk at Wednesday, July 6, 2005 9:01 AM Pacific Daylight Time

As Christof notes here:

If you ever need to have access to the context of a message, outside of the BizTalk Server orchestration environment, you may do so by passing the message as a parameter of type Microsoft.XLANGs.BaseTypes.XLANGMessage to a method in an expression shape.

However, once you have an XLANGMessage object it isn't obvious (at least it wasn't to me) how to use it. I needed to grab some context properties but the GetPropertyValue method was looking for a type and not a property name. However, it is really very simple, all you need to do is get the type of the property you're looking for.

So, for instance, if you were looking for the MessageID (or more precisely, BTS.MessageID), then you would use:


In order to use the above you will need to add a reference to Microsoft.BizTalk.GlobalPropertySchemas.dll in your project. If you want to get your own custom context types then you would use typeof on the type you define in your property schema (and you would need to add a reference to your property schema project or DLL).

Thursday, January 17, 2008 12:50:09 AM (Pacific Standard Time, UTC-08:00)
Thanks for this! you just saved me a ton of time!
Comments are closed.