问题
I have an XML to XML map which output beautifully. The issue is we want to route the output based on this one element/field coming into the map (there are 2 different values which can populate the same field).
The problem is the field repeats in the output so the field can't be promoted in the outbound map. We can only seem to get it to output in both locations if we apply a filter to the Send Ports.
I have tried defining a variable based on the field after making the field in the source file both Distinguished and Promoted. I have tried custom receive pipelines as well as send pipelines: currently the closest I come is outputting to both locations.
I know this is child's play for most of you but am stymied myself. Any assistance is appreciated.
回答1:
Have a canonical schema that is used internally that has the element used for routing as a promoted property.
Map the incoming message to the canonical schema.
Have your send ports subscribing to the promoted property on the canonical schema.
Have a map on each of your send ports that maps from the canonical schema to the desired outgoing schema.
来源:https://stackoverflow.com/questions/32674330/biztalk-2010-output-file-routing-based-on-element-value