Entry
What is the difference between distinguished and promoted fields?
Apr 6th, 2005 22:20
Balaji Ramachandran, http://www.netologi.se/default.aspx?Contents=BizTalkFAQ
There are two different ways in which you can programmatically access
an attribute or element in BizTalk, they are called Distinguished Field
and Promoted Property. The main differences between them are summarized
in the table below.
Promoted properties can do everything and more than distinguished
fields, but this doesn't mean that distinguished fields are less
useful. Actually you should prefer the use distinguished fields
whenever possible:
Which one of these two ways to access elements/attributes in a message
should you choose? The answer will present itself if you answer the
following questions:
Do you need to route on the information in the element/attribute?
Do you need to track the element/attribute?
Do you need to use information that can only be dynamically created,
i.e., it is not directly accessible in the message.
If the answer to any of these questions is Yes, then you need to use a
promoted property. If the answers to all questions are No, then you
should use a distinguished field.
Depending on the type of solution you are creating you will find that
you use one of these more than the other. Messaging solutions typically
use promoted properties to route incoming messages to the correct
destination, there is no need to use distinguished fields in messaging
solutions as you no way of accessing the value.
If you are building a solution containing orchestrations that model
business processes you will probably mainly use distinguished fields.
The reason for this is that you will have less need for the routing
capabilities of promoted properties, and as it is less expensive from a
performance perspective to use distinguished fields you should prefer
these. In orchestrations you can use distinguished fields in a number
of ways; conditions for looping and decisions shapes, expression shape
and message assignment shape.
Basic rule for which to use would be: always use a distinguished field,
unless you have to route, track, or correlate on the source content,
then use a property (i.e. promoted field).