Mapping a Request to a Response in a Private Process
This topic describes how to map a request message received by the private responder process—from the Microsoft BizTalk Accelerator for RosettaNet (BTARN) public responder process, to a response message that can be sent to the BTARN public responder process.
When a responder receives a request message, BTARN routes the request message from the public-process orchestration, to the private-process orchestration, to the line-of-business (LOB) program. The responder requires the response service content from the LOB program to generate a RosettaNet response message back to the initiator. Many of the elements in the response message are populated using the values from the request message. As a result, you can incorporate a map in the responder private-process orchestration to help the LOB program generate the response service-content message in the required format.
The BTARN SDK contains the following samples that you can use when you add a map to a responder private-process:
To create the map
Start Microsoft Visual Studio 2012.
On the File menu, point to Open, and then click Project.
Locate the folder that contains the BizTalk project that contains the private-process orchestration to which you want to add the map.
In Solution Explorer, right-click the project, point to Add, and then click New Item.
In the Add New Item window, in the Categories pane, click Map Files. In the Templates pane, click Map. In the Name box, type a name for the map, and then click Open.
In the Source Schema pane, click Open Source Schema.
In the BizTalk Type Picker window, expand Schemas, select the PIP schema for the request message that you want to map from, and then click OK.
In the Destination Schema pane, click Open Destination Schema.
In the BizTalk Type Picker window, expand References, expand Microsoft.Solutions.BTARN.Schemas.RNPIPs, expand Schemas, select the PIP schema for the response message to which you want to map, and then click OK.
Right-click the <Schema> node of the source schema, and then click Expand Tree Node.
Repeat step 10 for the destination schema.
In the Source Schema pane, click and hold on a field that you want to map to a field in the destination schema. Drag to the corresponding node in the Destination Schema pane.
Repeat step 12 for all fields that you have to map between the two schemas.
Validate and test the map. For more information, see the "Compiling and Testing Maps" topic in BizTalk Server Help.
To add the map to the orchestration
In Solution Explorer, double-click the private-process orchestration.
Note
Make sure that the orchestration has references to the assemblies that contain the schemas.
In the Toolbox, click the Transform shape, and drag it to the point in the orchestration at which you have to transform the request message into the response message.
Note
For an example of the placement of the Transform shape, see the PIP3A4PrivateResponder.odx orchestration. It is located in <drive>:\Program Files\Microsoft BizTalk <version> Accelerator for RosettaNet\SDK\PipAutomation\3A4\PR. This sample puts the Transform shape immediately under the IsActivityDoubleAction shape. For more information, see 3A4 Private Responder Orchestration Using a Business Rule.
Note
For an example of how you can incorporate multiple maps for multiple PIPs, see Double Action PIPAutomation Orchestration.
On the orchestration design surface, click ConstructMessage1. In the Properties window, type a name for the shape, and a name for the message to be constructed.
On the orchestration design surface, click Transform. In the Properties window, click the ellipsis button (...) next to Map Name.
In the Transform Configuration window, click Existing Map, and in Fully Qualified Map Name, click the map that you just created.
Under Transform, click Source. Click the empty box under variable, and select the name of the request message from the drop-down list.
Under Transform, click Destination. Click the empty box under variable, and select the name of the response message from the drop-down list.
Click OK.