thespot4sap.com independent sap information
 

get SAP Access - pay monthly

SAP Tutorials    Online SAP Training    SAP CBT's    SAP Forums    SAP Articles    SAP Jobs    SAP Resumes
  SAP Access    SAP Blogs    SAP Books     Links     SAP Vendor Directory     Submit Content    Search
Previous posts in BizTalk
Page 520 of 5577

Stacking Maps in BizTalk Server

Blogger : MSDN Blogs
All posts : All posts by MSDN Blogs
Category : BizTalk
Blogged date : 2008 Aug 07

Scenario: I have a need to process two transformations back-to-back.  For example, I have Schema1, Schema2, and Schema3, and I have two maps:

  • Schema1 -> Schema2
  • Schema2 -> Schema3

Schema1 is our canonical schema, meaning this is the schema we always use to "publish" to the MessageBox database.  Consider this diagram in which we receive a message and publish the update to two line-of-business (LOB) applications:

image

In the real-life scenario that inspired this test, the maps are very complicated and it would be too much of an undertaking (currently) to invent a new map for transforming Schema1 directly to Schema3.  So how do we apply multiple maps in a row using BizTalk?

For this example, I've built out three schemas and two maps, as outlined above.  Here are the schemas:

image

Complicated, I know! =)

First, the easy approach: Orchestration.

image

This works, however the message in the real-life scenario is over 600MB.  BizTalk Server, by default, will swap to disk for transforms performed in an orchestration when the message is over 1MB in size (see the note about TransformThreshold in this article).  We can increase this threshold if needed, but 600MB is a bit excessive, I think.

Once orchestration was ruled out, my first thought was to do something in a pipeline component; however, I wanted to see if I could do this without code.

So how about this: I set up a WCF-based NetTCP receive location (and BizTalk sets up its own service host -- how nice) and a corresponding NetTCP send port.  (In retrospect NetNamedPipes might have been better?  Not sure, but this still worked.)  On the way out of the send port, we transform to Schema2, which is published back to the MessageBox by the receive port.  Finally, our LOB2 send port applies the second map on its way out.

image

Yeah, yeah... it's clumsy... it's kind of a hack... but it was fun.

Seriously, however, if anyone has a different approach, I'm all ears. =)  Eventually the "correct" solution will be to create a map which transforms Schema1 directly to Schema3.

Sample code:

 

Technorati Tags: BizTalk

Read comments or post a reply to : Stacking Maps in BizTalk Server
Page 520 of 5577

Newest posts
New Page 1

 

 

About Us   Contact Us   Privacy   Disclaimer   Feedback   Email Discussion   Newsletter  

Copyright © - Independent SAP Information
Learn XML, Guesthouses and B&B's