Have you ever been in a situation where you needed to get a couple of fields from a message and insert them into another live message in a BizTalk orchestration? I am currently running into the possibility of doing this, so am thinking about my options for doing this.
Now, I could use a custom .NET helper function that will do this for me, or I could use a BizTalk Map with two source schemas and one destination schema to get the desired output. But won't it be cooler if I could just map one message into the other and simply have BizTalk override the desired fields?
To illustrate what I want to see in BizTalk, let's illustrate it using the classic purchase order example. I have the purchaseOrder request message, and I used some of its fields to create a message requesting a manager's approval to complete this transaction. The approval comes in, and let's say that I am interested in getting two fields from the purchaseApproval response message, ManagerId, and ApprovedQuantity. I need to insert these fields in the purcahseOrder message so that I can send it to a different application and have it processed there.
I would love to have the ability to create a BizTalk map to do this. I'll simply create a map that has as its source schema the ApprovalResponse schema and as its destination the PurchaseOrder schema. At the BizTalk orchestration, I will select the purchaseApproval message as the source message instance, and the purchaseOrder message as the destination message instance. In the properties of the transform shape, I will have the option to select one out of many options for the destination message instance: Create New Message Instance, Override Existing Fields, and may be another option (if you can think of one).
Some might argue that you can not risk overriding an existing message instance because it might be used by other BizTalk Orchestrations. Well, I think that when developing a system, you can tell in advance whether this message will be used in multiple concurrent processes or not, if you can't, then you have a problem.
Wich option do you think I should go for?
sk8er boi