Stephen W. Thomas BizTalk Blog

100% Pure BizTalk
posts - 130, comments - 139, trackbacks - 438

My Links

News

Subscribe to my blog via:


Add to Google

Visit my website at:
www.BizTalkGurus.com

Archives

BizTalk 2004 Samples

BizTalk 2006 Samples

BizTalk Videos

BizTalk White Papers

BizTalkBlogs.com

Great BizTalk Blogs

Other Links

Mapping Many Messages to One Inside the Mapper in BizTalk 2004

This is a cool feature of BizTalk 2004!  It allows you to map many documents into one or map one document into many.  In either case, your inputs will not equal your outputs.  This type of mapping does require some up front planning and careful consideration.

 

First off, this type of mapping is only allowed inside the Orchestration.  Basically, what the mapper does is creates a kind of multi-part message for either the input, output, or both.  The parts of the multi-part message are the different input/output messages.  This allows the mapper to take in or produce multiple messages.

 

I have only been able to create these types of maps by creating new maps using the Transform Shape inside the Orchestration.  I have tried to manually create them, but I have not been able to create/replicate the multi message behavior.  Also, I have not been able to find the mystery schema that the Orchestration generates when creating these new maps.  Surely is has to be someplace…

 

How to create maps with multiple messages? 

1. Create Orchestration Messages inside your Orchestration.  Lets say Input1, Input2, Output2, and Output2.

2. Add a Transform Shape to your Orchestration.

3. Select Output1 and Output2 inside the Construct Shape as Constructed Messages.

4. Click on the Transform Shape.  It will look like the figure below.

 

SC

 

5. Add the needed input message under Source and output messages under Destination.  Each messages needs to go on a new line inside the Transform Shape.  In this case, Input1 and Input2 are added to Source and Output1 and Output2 are added to Destination. 

6. Once completed, make sure the “Launch the BizTalk Mapped” is checked and hit OK.

7. The mapped will open and you will see multi messages on the Source and Destination.  These are nothing more then a new schema that includes the schemas from the input and output messages.  

 

Note: Be mindful of namespaces as I *think* they are required on all the multiple messages used by the new map.

 

The results would look something like this. 

SC

 

8. Map as needed.

 

You can modify an existing map to use multi messages but it will break any existing links.  If you want to modify an existing map, it has to be in the same project in order to modify the map to allow multi messages.  This is done by opening up the Transform Shape and adding additional messages to a new line under Source or Destination.  Once modified, then it can be moved to another project. 

 

Note: Moving the map might mess up all the namespaces and references so manual editing of the XSLT may be required.  So be careful!  Moving the maps works best if all the schemas used inside the map are referenced from external schemas project.

 

Overall: Mapping with multi messages is an extremely powerful feature when used inside the Orchestration.  Although, it can be difficult to convert existing maps into maps that use multi messages.

Print | posted on Friday, February 04, 2005 1:23 AM |


Feedback

# re: Mapping Many Messages to One Inside the Mapper in BizTalk 2004

I tried to to create the multi-input/output map outside orchestration, but I aslo failed. 2/4/2005 2:49 AM | Tareq Muhammad

# re: Mapping Many Messages to One Inside the Mapper in BizTalk 2004

BTW, I can't find a good description for multi-part message type.
would u exaplain please? 2/4/2005 2:50 AM | Tareq Muhammad

# re: Mapping Many Messages to One Inside the Mapper in BizTalk 2004

Hey Stephen thanks for this...
You wrote "Note: Be mindful of namespaces as I *think* they are required on all the multiple messages used by the new map." I discovered through trial and error that prior to SP1 you could get away without using namespaces in the multiple messages you created. After SP1 these projects no longer seemed to compile... see my post about it http://www.geekswithblogs.com/nparker/archive/2005/02/02/21727.aspx

Nigel 2/6/2005 2:04 PM | Nigel Parker

# re: Mapping Many Messages to One Inside the Mapper in BizTalk 2004

Also I had problems wwhen attempted to use more than two messages in the input... after that the root element of the messages appeared but the bodies weren't included? I didn't spend much time looking into this and haven't tried it since SP1 so it may no longer be an issue I'm not sure.

Nigel 2/6/2005 2:07 PM | Nigel Parker

# re: Mapping Many Messages to One Inside the Mapper in BizTalk 2004

If you open the .btm file in notepad you’ll see the schema definition for the multi-part messages there… it uses import calls. 2/7/2005 9:17 PM | Nigel Parker

# re: Mapping Many Messages to One Inside the Mapper in BizTalk 2004

The multipart message schema can be created using "Imports" property of the schema. The "imports" property allows you to import schema definitions from the same project or referenced assemblies. You can assign namespaces to the imports to avoid conflicts between the elements with same names in the different schema imported. Once this is done, one can simply add a record in the new schema and select its "Data Structure Type" as the imported schema. Same steps can be repeated to add mulitpart various "parts" to a schema. 11/25/2005 10:04 PM | Amit Lale

# re:

Messages to One Inside the Mapper in BizTalk 2004 10/4/2006 8:14 AM | Mapping

Post Comment

Title  
Name  
Email
Url
Comment   
Please add 6 and 6 and type the answer here:

Powered by: