Something about Distinguished Field

原创 2007年10月03日 12:42:00
 
Some facts with distinguished field that often confused me:
  • ·         What is a distinguished field?
Yes, it is light-weighted, it stored as xpath pointer compared to promoted property stored in message context. Yes, distinguished field is mainly used in orchestration compared to promoted properties could be used everywhere. However, distinguished field CAN be used in pipeline component as well. The namespace for it is GlobalProperties. DistinguishedFieldsNamespace (http://schemas.microsoft.com/BizTalk/2003/btsDistinguishedFields). As a reference, it could be set in pipeline component like followed code
m_msgCtx.Write(base.XPath, Globals.DistinguishedFieldsNamespace, str);
  • ·         How did its value been produced?
There is no magic of this, all BizTalk built in pipelines (except pass-through) implement a way to automatically promote the distinguished field while pipeline execution. Take XML disassemble for example, in its Disassemble method, it invokes XmlDasmReader to loop through all distinguished fields and promote them
IDictionaryEnumerator distinguishedPropertyAnnotationEnumerator = docSpecType.GetDistinguishedPropertyAnnotationEnumerator();
  • ·         What the above behavior means?
It means if you write your own disassemble pipeline component and does not deliberately promote the distinguished field by
propertyBag.Write(distField.XPath, Globals.DistinguishedFieldsNamespace,
distFieldNode.InnerText);
If you do not do this, you won’t be able to use the distinguished field in orchestration!
·         Performance wise, which is better? Promoted property or distinguished field.
Distinguished field takes the lead. Since it is rather light-weighted and much less overhead.
 
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:Something about Distinguished Field
举报原因:
原因补充:

(最多只允许输入30个字)