Tuesday, January 16, 2007

BizTalk Correlation of Untyped Messages

Richard Seroter - SoCal BizTalk Musings : BizTalk Correlation of Untyped Messages

This is VERY cool...

I had two choices: created fifty separate orchestrations to handle all of the types and scenarios I needed to cover, or find a way to correlate untyped (XmlDocument) messages. I searched for the latter and found this article.

public IBaseMessage Execute(IPipelineContext pc, IBaseMessage inmsg)
{
string trackCode = Convert.ToString(System.Guid.NewGuid());
inmsg.Context.Promote("TrackingID", "http://Microsoft.Demo.Customer.CustomerPropertySchema", trackCode);
return inmsg;
}

Sweet!

No comments: