This also can work for multiple outputs to BizTalk Map also.
A recent post was asked how to take multipe messages and merge them into an output message structure. This actually puzzed me while I was learning the way BizTalk worked. Here is a simple example of how it works, and how to implement it…
- The first thing this orchestration does is start off by consuming a trigger message.
- It then constructs the calls to the two stored procedures
- Then it calls the stored procedures and gets the responses from the stored procedures.
- It then takes the two responses and invokes the map. Here is the picture of the input arguments to the map:
- This is what the map looks like after you create the map with the multiple inputs:
- It then creates the file an sends the resulting file out.
- Here is the complete view of the orchestration:
- Extract this file
- In the Properties of the project point to a strong named key file and set the BizTalkMgmtDB to your server
- Run the included sql script against the Northwind database to create the stored procedures
- Deploy the project
- create 4 ports
- One input using Default XML pipeline and pointing to ..\MultipleInput\Input directory
- Two Static Solicit/Response ports pointing to the Nortwind database and setting the Document Target Namespace to be http://storedprocx/ (X being the number of the stored proc), setting default xml as both the Send and Receive pipelines
- One send port, setting the default xml pipline and pointing to the ..\MultipleInput\Output directory
- Bind the logical ports to the physical ports created in step 5
- Start the orchestration, drop the trigger in the Input directory, and you are good to go