Rodrigo Guerreiro

"The purpose of a programming system is to make a computer easy to use", in The Mythical Man-Month
posts - 59, comments - 16, trackbacks - 9

Promoted property without message schema

Let's say that you need to have a context property in order to use it in your Send Port filter. Probably you would do this by selecting one specific field in your schema and mark it has a promoted property. This is basic BizTalk 101. But try doing that without a schema. Now that's a problem! But the solution is very simple.

  1. In your BizTalk project create a property schema. image
  2. Add the property or properties that you would like to promote. In every single one go to the Properties window and set the Property Schema Base value to MessageContextPropertyBase.
  3. Inside your orchestration add a Message Assignment and construct your message, which could be of any type, even a typical XmlDocument. In there add the following line: MyMessage(MyNamespace.MyProperty) = "SomeValue";

This the first part of the solution, because if you deploy it just like this you'll get this error (although at this point you're able to set the Send Port filters with your properties):

Routing Failure Report for "Routing Failure Report for "MyOrchestration, MyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cd16194ad8010d12""

The reason is shown in the second image. In my case I have two message context properties but they appear as NOT PROMOTED, which means that they aren't used to route the message and so the Send Port filters aren't used. The next steps are to show how to promote our property:image

  1. First create one Correlation Type with the property or properties that you want to promote.
  2. Create the Correlation Set for the Correlation Type that you created.
  3. In the Send Port set the Initializing Correlation Sets property with the previously Correlation Type created .

And that's it. Easy, hum?

Until next time ;)

 

Print | posted on Wednesday, February 20, 2008 2:13 PM

Feedback

No comments posted yet.

Post Comment

Title  
Name  
Email
Url
Comment   

Powered by: