Promoted Properties are the most common way to enable content-based routing. They are available to the pipelines, adapters, Message Bus and orchestrations. It is usually the job of the disassembler pipeline component such as the XML and Flat File disassembler but any custom pipeline component can also do it.
As stated in a previous post I wrote, BizTalk Messaging Architecture , message context properties are defined within a property schema and so all promoted properties must be defined in a custom property schema. The action of promoting a message element to a promoted property creates a message context property that will contain the message element value and flags it as promoted so that it is available for routing. Quick promotion is the simplest way to create a promoted property.
When choosing this option, Visual Studio will create a property schema called PropertySchema. If you have several elements with the same name, you might want to use manual promotion instead to avoid confusion or avoid having a property value overridden.
To manually promote a property, a property schema must be created with the elements that will hold the promoted property values. To create a property schema, you need to add a new item in your BizTalk solution, and chose Property Schema as the type of file see Fig. Note that it is actually possible to use more than 1 property schema per message. Anyhow, all promoted properties will end up being written in the message context and available for all BizTalk artifacts having access to message context.
Once the property schema is picked, you can start promoting message elements as promoted properties. To do so, click a message element and click on the add button, the Node Path column will display the XPath to the message element you are promoting and the Property column let you chose the promoted property that will contain the value of the message element at runtime see Fig.
An interesting side effect is that Manual Promotion let you have promoted properties with different names that the original message element name. This might be useful when a same property schema is used to hold promoted properties from different message types or when a message has different element with the same name.
Using Manual Promotion, it is also possible to promote message elements to promoted properties in the system property schemas shipped with BizTalk. To do so, just browse in the References sub-tree when picking the property schema see Fig. So if you set a value on a distinguished field in orchestration, it is actually changing the message content for that particular field in the message body. You always have to create a copy of the received message, and perform the changes in a Construct Message Shape.
Hi Mohit, Distinguished fields can only be used within orchestration whereas promoted property fields can be accessed through all phases of the BizTalk message processing, either in orchestrations or from custom code, routing and pipelines. Behind the scene, the real difference lies within the implementation of these two types of promotions. For promoted property fields, BizTalk simply takes note of the XPath expression used to point to the property fields, whereas for distinguished field, the values of the fields are actually copied to the message context within the orchestration.
Promoted Properties are Message Context Properties that are flagged as promoted. Being promoted it allows the Message Engine to route messages based on their value, and being in the message context allows doing so without having to look at the message payload which would be an expensive operation.
They are the most common way to enable content-based routing. There are 2 ways to promote a message element: Quick promotion: Quick promotion is the simplest way to create a promoted property. When choosing this option, Visual Studio will create a property schema called PropertySchema.
Manual Promotion: To manually promote a property, a property schema must be created with the elements that will hold the promoted property values. To create a property schema, you need to add a new item in your BizTalk solution, and chose Property Schema as the type of file. Distinguished fields are message elements that are written into the message context. Agreed, Distinguished field change the message content and Promoted property change the message context property.
When we use Construct message, we create a new message. Due to this, I was able to modify the message field value by promoted property as I am creating a new message. Conclusion : We cannot change the incoming message in BizTalk message box. However, we can create a copy of message and modify the message Use Distinguished field, Promoted property and XPath.
If you are setting a property schema field based on a message element in orchestration on a new message, you will be able to change the actual message field value due to the way orchestration demotes these property values in the message body before publishing it to the message box.
First of all you need to understand the difference between the content and context in reference to the BizTalk terminologies. There are two ways to get content of message specified filed directly in BizTalk in message.
Distinguished fields and Promoted property. When to use distinguished fields: If you make decision, read values, update values of any message inside the orchestration Use distinguished properties. Promoted Properties: When required value of filed at port level then used Promoted properties. For promoted fields, orchestration engine would have to run the XPath expression every time the field is accessed; but for distinguished field, the engine can simply lookup the values from the message context without having to load the entire document into memory and evaluate the XPath expression.
There is also a maximum character length limitation on the property fields. However, even though there is no length limitation on the distinguished fields, writing over characters into the message context will most certainly degrade the performance.
0コメント