Digital Serenity

Digital Serenity is the blog of John McPherson Leask III (Jay). His mind wanders from food to travels, every-day activities and humor to sports, podcasting and technology - though mostly the focus of Digital Serenity will be his technological exploits.

BizTalk'06 Advanced Functoid: Looping

I'm not new to BizTalk but my experience is limited to mapping, lots and lots of mapping (if your Google search brought you here and you're looking for a Guru, sorry but I'm not him.  Go check out Stephen Thomas's BizTalkGurus.com site instead).  In fact I spent about 4 months using the BizTalk Mapping tool for BizTalk 06 before I was even a regular .NET programmer.  That said, I learned something new today: the BizTalk Advanced "Looping" functoid isn't required as often as I thouht it was.

What is the "Looping" Functoid?  I'm going to point you to the MSDN definition for details, but basicailly when you have multiple XML nodes in your sources schema and you need them to all loop into the same set of nodes in your destination schema, you use the looping functoid.

Considering this map, even though the two parents are differnt, they will both end up in the same repeating node in the destination, each with their own version of destionations <parent>.    Now this may not be a suprise to you, it's fairly self explainitory.  What does suprise me though is the following.  If I wasn't looking to map, from the souce, both <parent> and <parent2> into the same <parent> node in the destination, I wouldn't need the Looping functoid.

Instead I'd only need to drag a link between both of the <parent> nodes, as follows:

Now this really doesn't seem that major, in fact I don't believe it make your maps more effient or quicker, but what it does mean is less functoids on your map panels, and if you've worked with huge schemas, you know how difficult it can get to read your maps when they're full of tons of functoids (Check out Tim Rayburn's comments on Mapping Organzation for ways to keep your crazy maps in check!)

That said, not linking the parent in any way at all, like this:

... gives you a destination that will combign all of the children of every parent in the source into a single parent in the destination,  and at least in most of the cases I've worked with, this is not the desired effect. 

Looking back at it, this seems fairly obvious, but as they say, hind sight is 20/20 ... What seemingly obvious things have you picked up along the way that makes your Maps less complicated?

 

Published Friday, May 18, 2007 1:55 PM by jleask
Filed under:

Comments

No Comments