News

Copyright © 2008-2019 Paula DiTallo

Tag Cloud



What is a "splitter pattern" in BizTalk?

Overall, when an incoming XML message contains multiple potential single messages, the extraction process needed to separate the messages out is thought of as "splitting " or "shredding" the message. The splitter pattern then, is a reliable, uniform way to address splitting/shredding throughout your applications.

An example for why your application might need to split messages would be something like a single input XML message with multple pension fund benefits for multiple persons which require multiple output XML messages with each pension benefit grouped for each person in a single transformed XML message.

There are alternative ways to successfully shred the message, but the pattern I like best can be tested by:

  • Developing an orchestration test harness that picks up the messge "as is"
  • Developing  the mappings for the splitting off of the single messages
  • Identifying which element under which node contains what will demarcate a single message. (e.g. social security number, beneficiary id, etc.)
  • Developing an xsl map isolating only the unique identifiers
  • Creating a new map, with a scripting functoid--under the properties,choose the inline xsl template. Cut and paste the xsl you created earler and dump it in.
  • Cycling through the unique identifiers by looking at the xpath info while iterating within a loop shape.
  • Adding an expression shape to build the single messages
  • Outputting the resultant single messages to a send port

Matt Meleski has a very good example of how to actually implement this pattern using a map and an orchestration.

http://objectsharp.com/cs/blogs/matt/archive/2005/04/12/1703.aspx

Of course, I may like this pattern best because Matt has done such an exemplary job sharing his implementation!

Darren Jefford also has a way cool pattern for splitting messages which relies on the schema element of the envelope and you guessed it... xpath!    .  Check out his blog:

http://blogs.msdn.com/darrenj/archive/2004/08/30/222614.aspx

 

 

 

 

Monday, January 28, 2008 5:48 AM

Feedback

No comments posted yet.


Post A Comment
Title:
Name:
Email:
Comment:
Verification: