This post will focus on the more generic MessageData and MessageContext PropertyBase and explain the differences between the two further.
When creating a property schema you can set the “Property Schema Base” of the property node you are creating. There are some fundamental differences between MessageContextPropertyBase and MessageDataPropertyBase. Above is a screenshot of the dropdown box where you can select the Property Schema Base. The default setting for a Property is “MessageDataPropertyBase”.
Let’s elaborate a bit more on the differences. In the table below I will describe the behavior of a property for both specific types.
|Is set in a receive Pipeline||Is set in a receive Pipeline.|
|Could be bound to data in the message. But can also contain a value that is not in the message at all.||Is always bound to a data node in the message. If the Data node it points to is absent, the context property will be absent as well.|
|Is Promoted in a receive Pipeline.||Is Promoted in a receive Pipeline.|
|Is not populated after a message construct shape in orchestrations.||Is auto populated after a message construct shape in orchestrations.|
|Orchestrations can use the property in the Activating Shape’s Filter.||Orchestrations cannot use the property in the Activating Shape’s Filter. The orchestration Editor doesn’t allow this.|
|Send ports and send groups can subscribe to these properties.||Send ports and send groups port can subscribe to these properties.|
|Can attach to every message. So it will be copied when copying everything.
messageA(*) = messageB(*).
|Can only attach to typed messages containing the specific property. So it is not copied by messageA(*) = messageB(*).|
|Will be promoted if a correlation is initialized.||Will be promoted if a correlation is initialized.|
In a messaging only scenario you will hardly notice the difference between MessageData and MessageContext. This is because the end result, when the message hits the message box, is the same. The property is promoted and a send port can subscribe to it.
In scenarios where orchestrations are used, the differences are more noticeable. The “Auto Populate” feature is nice because you never have to worry if a Property is representing the correct value. Too bad you cannot subscribe orchestrations to MessageData properties.
Subscribe to our RSS feed