Geeks With Blogs
Jeffrey's Blog .Net Developer

I had a surprise recently about the behaviour of the Table Looping and Looping functoids that I wasn't expecting and involves when the scripting functoid is evaluated.

For those of you only interested in the comparison...

In the following map, the highlighted scripting functoid will be evaluated once per Client element.

image

In the following map, the highlighted scripting functoid will be evaluated once per element in the Client element.  In other words, for every Client element, the scripting functoid will be evaluated 11 times.

image

In other words, for an message containing 100 clients:

Looping Map:  1100 script evaluations

Table Looping Map: 121,000 script evaluations (100 clients * 11 script functoids * 11 elements)

Details of Comparison

Schemas

Both of the example maps accomplish the same thing, namely going from one schema to another where the content structure does not match.

An example source xml message:

image

An example destination xml message:

image

Note: The destination xml is based on the Sharepoint Lists.asmx UpdateListItems() method

 

Script Functoid

In this example, I am just calling an external assembly that updates a performance counter.  In the real-world scenario, I was calling an external assembly that did a Sharepoint lists lookup to determine the lookup id for a lookup list.  For clarity, the script functoid settings in the Table Looping Map are:

image

Where the IncrementTable in the Table Looping Map and IncrementLoop in the Looping Map method updates a Performance Counter BTSComparison for instance Table and Loop respectively.

Orchestration

The orchestration simply reads in a single xml file and using the maps generates two identical output files.

 

Summary

As there are a ton of resources on the net showing similar maps and orchestrations, I have not gone in to much detail.  If anyone is interested in this example in more detail, let me know and I'll post a better explanation and source.

Obviously I am still getting my head around the mapping functoids as to when best to use which one.  Like elsewhere in BizTalk there are more than one way to accomplish the same task...

Posted on Wednesday, April 16, 2008 1:40 PM BizTalk , Sharepoint , Map | Back to top


Comments on this post: BizTalk Map: Comparison between Table Looping and Looping functoids

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


Copyright © Chilberto | Powered by: GeeksWithBlogs.net