1 to 1 mappings are pretty easy in Biztalk. Just drag a link from your source to your destination and done.

1 to N and N to 1 mappings require a bit more thought, with use of the looping and flattening functoids.

The final piece of the puzzle in Biztalk mapping is N to N mappings. Today we'll specifically cover mapping from static N item nodes to a dynamic N items node. Yes, Biztalk has a feature for that!

The table loop functoid will accept NxM nodes and then order them into N rows of M nodes. For example let's say we have the following nodes:

By sending all these nodes to a table looping functoid it can order them as a row of related information then feed each row to an instance of a single Payment Node. There's a second functoid for retrieving data from a table looping functoid, the table extractor functoid.
It extracts a single column of data to be fed to an instanced node. So with the extractors our output will look like


In this simple case we were essentially just unifying our data so the destination schema had a cleaner dynamic node representation rather than the awkward static one. However the table looping functoid can unite disparate elements, like authors and directors from a list of movies and books.

Opening up a table looping functoid will give you access to the usual arguments list. The first argument is the scoping link. The second dictates the number of columns and every argument after that is data to be added to a column. The second tab, Table Looping Grid, allows you to visually assign the data to its relevant column. This is essentially an SQL table as each row is a grouping of information about an item and each column is a grouping of a type of information.

Each table extractor functoid then takes the table loop as an input along with a value that is the index of the column it is extracting. These are not zero-indexed! Your table extractor should then link to a subnode in a repeatable node and for each row an instance of that subnode will be created with the row's value for that column.

Of course if you're looking for more, Microsoft always have their guide hidden away.

No comments

Add Comment

Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
Standard emoticons like :-) and ;-) are converted to images.
E-Mail addresses will not be displayed and will only be used for E-Mail notifications.
BBCode format allowed