BizTalk Document Mapping – Mass Copy Functoid

  • Sandro Pereira
  • Jul 20, 2009
  • 3 min read

Mapping large XML documents field by field can be tedious and error-prone. When you have two schemas with identical sub-structures, the Mass Copy Functoid is your best friend.

The Mass Copy functoid allows source records and their containing elements and attributes to be copied and mapped across to the destination schema. It creates a wildcard (/*) XSLT template match to recursively copy elements.

📝 One-Minute Brief

The Mass Copy Functoid is a powerful tool for BizTalk developers needing to replicate entire message sub-structures without manual mapping. This post explains how to use it to copy records and their children—including attributes and nested elements—efficiently. While it’s a huge time-saver for identical schemas, it requires caution as it restricts further mapping of child elements within the destination record.

Benefits

  • May provide a performance benefit, as each source and destination elements do not require a 1:1 detailed mapping on all subsequent schema nodes, requiring fewer XSLT code instructions to be interpreted and executed at runtime. Very useful when XML structures in source and destination schemas are compatible (identical).
  • Allows a large structure to be mapped quickly during design time
  • Very useful when the destination is defined as an <xs:any> type. Mass Copy Functoid can be performed only at the node level, not at the field level. So the node containing the <ANY> field has to be mapped.

What is the Mass Copy Functoid?

Located in the Advanced Functoids category, the Mass Copy functoid allows you to link a source record to a destination record. When executed, it copies the record itself, all its attributes, all its child elements, and all its nested structures in one go.

How to Use It

  1. Drag the Mass Copy Functoid onto the grid.
  2. Connect the Source Record to the functoid.
  3. Connect the functoid to the Destination Record.

Problems/Limitations

  • Mass Copy Functoid will “blindly” copy all child elements specified in the destination schema, and it will not copy elements out of order or check for required values in the destination schema.º

Master Every Advanced Functoid

The Mass Copy is just one of many “Advanced” functoids that can simplify your life. To learn the best patterns for looping, conditional mapping, and high-performance XSLT, download my free 400-page book:

👉 BizTalk Mapping Patterns and Best Practices

This reference guide is intended to make your day-to-day life as a developer easier with effective, robust, and organized recipes for success.

Hope you find this helpful! If you liked the content or found it useful and would like to support me in writing more, consider buying (or helping to buy) a Star Wars Lego set for my son. 

Thanks for Buying me a coffe
Author: Sandro Pereira

Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc. He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.

Leave a Reply

Your email address will not be published. Required fields are marked *

The Ultimate Cloud
Management Platform for Azure

Supercharge your Azure Cost Saving

Learn More
Turbo360 Widget

Back to Top