For this exercise, I am building an orchestration which
identifies the Company and loads the corresponding map and sends the
message to the intended recipient after the desired transformation. For this
example, I have two Company A and B.Orchestration
identifies company based on ID .
Then transform message dynamically .
Step 1:Create Input Schema OrderDetails.Xsd
Input Schema
Step 2:Create Two Destination Schema CompanyA_Order.xsd and CompanyB_Order.xsd
Step 3:Create Two Map for Company A and B ,
- OrderDetails_CompanyAOrder.btm and
- OrderDetails_CompanyBOrder.btm
Step 4:Create Orchestration for Dynamic Mapping
Expression Used for Dynamic Mapping
ExpressionShape
if(Message_1(Company.Demo.DynamicMapping.PropertySchema.Id)=="A")
{
MapType = System.Type.GetType("Company.Demo.DynamicMapping.OrderDetails_CompanyAOrder,Company.Demo.DynamicMapping, Version=1.0.0.0, Culture=neutral,PublicKeyToken=884e2210690b4615");
}
else
{
MapType = System.Type.GetType("Company.Demo.DynamicMapping.OrderDetails_CompanyBOrder,Company.Demo.DynamicMapping, Version=1.0.0.0, Culture=neutral,PublicKeyToken=884e2210690b4615");
}
{
MapType = System.Type.GetType("Company.Demo.DynamicMapping.OrderDetails_CompanyAOrder,Company.Demo.DynamicMapping, Version=1.0.0.0, Culture=neutral,PublicKeyToken=884e2210690b4615");
}
else
{
MapType = System.Type.GetType("Company.Demo.DynamicMapping.OrderDetails_CompanyBOrder,Company.Demo.DynamicMapping, Version=1.0.0.0, Culture=neutral,PublicKeyToken=884e2210690b4615");
}
MessageAssignMentShape
transform (Message_2) = MapType(Message_1);