Stephen W. Thomas BizTalk Blog

100% Pure BizTalk
posts - 133, comments - 192, trackbacks - 427

My Links

News

Subscribe to my blog via:


Add to Google

Visit my website at:
www.BizTalkGurus.com

Archives

BizTalk 2004 Samples

BizTalk 2006 Samples

BizTalk Videos

BizTalk White Papers

BizTalkBlogs.com

Great BizTalk Blogs

Other Links

Property Schema and Promoted Properties inside Custom Pipelines for BizTalk 2004

Topics Covered:

- Custom promoted properties inside a pipeline

- Schema Property: “Property schema base”

- Direct binding to the message box

 

I have spent a lot of time in the past few weeks working with promoted properties through property schemas.  I was using the standard approach, to simply set the promoted properties inside the schema.  This, in turn, would allow the properties to be promoted inside the pipeline with no additional effort on my part.

 

This led me into working with custom pipelines that promoted additional properties that are not inside my message.  Once custom properties are promoted, I wanted to use these items for routing to an Orchestration. 

 

Example: I want everything processed by pipeline X and pipeline Y to promote a property named myCustomProp that says “I belong to group A”.  Then, I want all group A items to be processed by Orchestration 1.  I accomplished this by writing a custom pipeline component that promotes predefined text into myCustomProp.  Then, I used direct message box binding on the Receive Shape of the Orchestration to pick up message that have this property. 

 

CRITICAL: You will need to change this property inside the Orchestration to something other then “I belong to group A” before you send the message.  Otherwise, when you send it and the Orchestration will start again because it will match the subscription again.

 

The key point here is I want to set up a filter shape based on my new promoted property that I promoted inside my custom pipeline.  This property does not exist inside the schema of my received message.  I started getting the following error when I tried to build my Orchestration:

 

“message data property ‘MyPropertySchema.myCustomProp’ does not exist in messagetype ‘msgStart’

 

Ok, so what does this mean? 

BizTalk is helping you out my looking inside your message and telling you ahead of time that your property does not exist.  What a great feature, but in this case we do not want this enforced.

 

How do I fix it?

Simple solution… Although it took me hours to figure out. 

There is a property that can be set on each element node inside your property schema.  This property is inside the Reference sections named Property Schema Base. 

 

What is this used for?

It is used to specify the origin of the data that will be promoted into that Element in the Property Schema.  I did not realize how important this property was. 

 

The two values for this property are:

MessageDataPropertyBase (Default) – This means the data used to populate this field will come from a message

 

MessageContextPropertyBase – This means the data use to populate this field may or may not exist in a message.  i.e. it could be prompted inside a custom pipeline and set to values not inside the message.

 

Well, it turns out that setting the Property to the correct value is the key to building your Orchestration. Setting this value to MessageContextPropertyBase will allow the Orchestration build since this property will not be expected inside the message.

 

Take Away: When you are working with Promoted Properties that may or may not be included inside your message make sure you set the Property Schema Base property to MessageContextPropertyBase.

Print | posted on Friday, August 27, 2004 1:39 PM |

Feedback

Gravatar

# re: Property Schema and Promoted Properties inside Custom Pipelines for BizTalk 2004

Hello.

Are you promoting the properties yourself inside your schema? I can not seem to find any adapter specific properties that are promoted by the SQL adapter.

In any case, you would get your promoted properties when the initial message or messages enter the Orchestration. These steps would break your SQL data into many messages, is that what you want? If that is the case, it will be hard to know when the last message is processed to return the value to SQL.

If you want, you can send me your code and I can talk a look at it. I’m running a little behind so I would not be able to be to it for a few days. You can find my email address in any of the ReadMe.txt files inside any of my samples.

Stephen W. Thomas
9/8/2004 11:47 PM | Stephen W. Thomas
Gravatar

# re: Property Schema and Promoted Properties inside Custom Pipelines for BizTalk 2004

Thanks, i was struggling with working out how to extract my message context properties (added in a custom adapter) from my inbound message. This clarified how I should go about it.
10/19/2004 9:39 PM | Nikolai
Gravatar

# re: Property Schema and Promoted Properties inside Custom Pipelines for BizTalk 2004

Thanks, for your great article.
but, in Biztalk2006
Can i knew what is the goal from using Promoted Properties?
are the answer will be, because it added to my send port or because it will be added automatically to your pipeline.
Really, i search for the answer of this question.
my E-Mail:Radi2k@yahoo.com
3/18/2007 11:43 PM | Mohamed Radi
Gravatar

# re: Property Schema and Promoted Properties inside Custom Pipelines for BizTalk 2004

Can I promote a field in my schema without using/creating property schema? Do it in code etc? Because I don't want o create a property schema physically.
10/8/2008 11:49 AM | Josh
Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification:
 

Powered by: