Hi all
I had a post about promoting reoccurring elements in BizTalk. As we all know, this isn’t possible…. BUT… actually… well…
Basically, you promote properties for three reasons:
So, dealing with number 1, routing, I started thinking back at BizTalk 2002, which was my first BizTalk experience (I’l bet ALL BizTalk developers/architects think of BizTalk 2000/2002 every now and then… no? ). I seemed to recall that you could do something fancy with routing back then, so I fired up an old BizTalk 2002 on windows 2000 Professional to test it. It turns out, that on a channel you can enter a filter which is an XPath expression. The text field is editable, so you can change the XPath expression all you want – it will complain if you try to leave it with an invalid XPath expression (syntactically – not semantically).
Given this XML:
<MyRoot> <myReoccuringRecord Myfield="42" /> <myReoccuringRecord Myfield="2" /> <MySecondRecord MySecondField="jan" /> <MyThirdRecord> <MyThirdField>1</MyThirdField> </MyThirdRecord> </MyRoot>
I can have a channel with this filter:
Basically, documents will only go through this channel, if the value of the “Myfield” attribute of the first “myReoccuringRecord” element has the value 42.
So, it isn’t promoting as such – BizTalk 2002 doesn’t have this concept, but it allows us to route based on the value of a specific occurrence of a reoccurring element.
On a side note; If you leave the filter like this:
it will accept the incoming document no matter what the position of the “myReoccuringReord” is. Can’t make up my mind if this is a good thing or not
Now, as we all know (?), manually editing the XSD in BizTalk 2006 solution to make sure the XPath evaluation will only return a single XmlNode doesn’t work. You either get a compile time error:
or you get a runtime error:
Anyway… not that many BizTalk 2000/2002 installations till in production, I assume, so this post is merely for informational purposes. It’s just funny discovering functionality that is doable in earlier versions of BizTalk and not in the latest versions.
-- eliasen
Remember Me
a@href@title, b, blockquote@cite, em, i, strike, strong, sub, sup, u
Theme design by Jelle Druyts
Powered by: newtelligence dasBlog 2.3.9074.18820
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.
© Copyright 2024, Jan Eliasen
E-mail