Apply multiple maps sequentially in a receive or send port
There are several use cases where we need to apply a map then apply a second map on the target message of the first map.
In order to do that we need to implement an orchestration or use the ESB itinerary.
It could be good to have this feature out-of-the-box: if multiple maps are associated with a port and if the source message of a map is the destination message of a previous map, then the second map is also applied.
Hans Bjerner commented
Another very easy to implelemnt pattern: Use a loopback adapter on a solicit-response SendPort and have the first map on the outbound message and the second map on the inbound message. A loopback adapter would makea nice OutOfTheBox feature for BizTalk.
John Stephens commented
This is very easy to do with an Xsl Pipeline component, such as the one ship in the SDK folder. No Itineraries necessary.
Actually, it's the Port Maps configuration that's the oddity. Transforms belong on the Pipeline design surface just like Orchestrations.
John Callaway commented
There is a potential hack for this, but it requires using the ESB toolkit pipeline components. There is a transform pipeline component (generally only used by the audit offramp) where a map can be explicitly specified, and the dispatcher also has a transform setting for static configuration of a map without using the rest of the itinerary capability. Maybe just leverage these pipeline components and create your own custom "execute two maps" pipeline. Just spitballing an idea here.
Very interesting point
David GROSPELIER (MiddleWay) commented
Fernando, one example is to do message versionning.
- I have one map from External schema to Canonical Schema v1
- Then I create a new version of the Canonical Schema (v2). If I can add a new map from Canonical v1 to Canonical v2, it could be very simple.
Very odd behaviour, Why not do everything in the first map? Give a good exemple.