what is the difference between promoted and distinguished
property?

Answer Posted / rajesh charagandla

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:

Distinguished Field Promoted Property
Syntax msgOrder.CustomerId msgOrder(BookShop.CustomerId)
Access method Using XPath in runtime. Inserted in message
context during pipeline processing.
Can be accesses by Only in code in orchestrations. Both in
orchestration code and in the messaging configuration (e.g.
filters on send ports).
Storage Only run-time access A promoted property is stored
in the message context.
Constrained by message contents Yes, only values within the
message may be accessed. No, any type value can be promoted
in a pipeline (there is no need for the value to be
contained in the message).
Routable No Yes, as they are attached to the message context
they can be used for routing
Expensive (whatever that means) No Yes, even if they are
never used they are always read and inserted into the
message context. As the message is passed through the
MessageBox and Orchestration the context needs to be copied
and stored.
Visible in HAT No Yes
Size limit Unlimited Max 256 characters
XSD type support More than prom.prop. Less than dist.fields

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).

Is This Answer Correct ?    14 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between distinguished field and promoted property? : biztalk server

535


I have a receive port and send port whose message types are different.when I receive a message in my receive port,my process starts.i will construct my out message and give this to my send port.i am configuring a send port group to

508


Define adapters?

581


What are Host and Host Instance?

556


what is the use of schema in biztalk and why we use schema?

1326






What is custom pipeline and the use of custom pipeline?

524


What are persistence points?

511


Explain about Message routing and content routing?

532


Difference between field and promoted property?

556


What is convoy and correlation sets?

589


how to handle the error in soap

2223


Define mapping?

505


What is the latest version of biztalk server? : biztalk server

543


Define schema?

526


List out some artifacts of biztalk server? : biztalk server

562