Geeks With Blogs
ErwinAI - Enterprise Application Integration (EAI) blog on BizTalk 2004, Visual Studio, and application integration
Over the past 2 years, I have developed most of the functionality in BizTalk using maps. You'll spend the days dragging and dropping functoids, and changing their properties. BizTalk maps are not much more than a graphical layer on top of XSLT, with some convenient (database) functoids, and allowing for inline scripting. It has been pointed out that the BizTalk maps are stored (and executed) as highly inefficient XSLT "code". Personally, I am not in favor of coding XSLT myself, as an alternative to the BizTalk maps. It reminds me of writing assembler for 68000 processors: even though the toolbox is well-equipped, building something complex requires a considerable amount of bespoke spaghetti. For decision shapes in an orchestration, you sometimes need to access the contents of a message at orchestration level. For that, BizTalk knows the concepts of promoted and distinguished properties. A certain element in message schema can be promoted, so that it will become part of the message context. This makes the value of element available to the orchestration. Promotion comes with limitations: - Element values of about 255 characters long (or longer) cause a runtime error when the element is promoted (does not apply to distinguished properties). - Elements can only be promoted if there is a guaranteed (design time) zero or single occurrence of the element in the message (i.e. in each valid message that can be derived from the schema). That makes sense, but is limiting. To overcome the potential issues with promoted properties, I started to used xpath expressions as an alternative. The limitations of promoted properties do not apply. Setting up logic (in an assignment shape, for example) is much simpler using xpath-expressions compared to promotion: in case of promotion, you'll have to change the schema, and then define the XLANG/s statements using it. Impressed with the power of xpath-expressions, I started to extend their application. Instead of a simple map, only populating a few elements in the target message, I create an assignment shape, implementing the map rules as XLANG/s code, using xpath-expressions. In assignment-statements, xpath-expressions can be used on both the left side and the right side of the assignment. Posted on Tuesday, April 25, 2006 8:24 PM BizTalk 2004 Hints, Tips & Tricks | Back to top

Comments on this post: BizTalk 2004 - xpath rules!

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Erwin Homan | Powered by: