Sunday, January 26, 2014

Can We Have Multiple Maps With Same Source Schema On The Port


Is it possible to have more than one map with same source schema on a port? There are two answers for it Yes and No.

Why Yes -- BizTalk won't stop you from configuring multiple maps with the same source. As it's perfectly legitimate to have a port associated with multiple maps.

Why No -- Irrespective of how many maps you have configured on the port, only the map which matches the MessageType of the message will be executed. And as soon as the first matching map is found, other maps are neglected. As the relation between message and map is 1:1, a message can be processed by a single map only (If and only if it's source type matches).

Let's consider this through a scenario:

We have three maps created with the same source schema, but different destination schema as shown below:



To test we deploy the application, and configure the receive port with all the three maps, as shown below:



An Item message was dropped in the receive location and the output was Artifact message, only one map was executed by the runtime.
That happens to be the first map from below, so does that mean runtime looks for map from bottom to up sequence?

To clarify this, I removed ItemToArtifact map, and tested again by dropping an Item message at receive location. And this time output was Product message. So the order in which the map gets selected can't be predicted.

But only one map is selected against a message in spite of having many maps with same source schema.

1 comment:

  1. The procedure "admsvr_GetRecvPortTransformAssemblyName" is responsible for the selecting the map to execute.

    ReplyDelete