Dynamically selecting a message map

To dynamically assign a message map to a Mapping node at runtime, you must pass the new map name in the local environment tree. You must define the new map name in the MappingRoutine element. The value you set in the MappingRoutine element overrides the map name that is set in the Mapping routine property of the Mapping node.

About this task

You can create, deploy, and run a message flow that invokes a different message map at a Mapping node.

You can override the mapping routine that is used to transform a message instance by specifying a new mapping routine in the local environment MappingRoutine element. You must specify the new mapping routine in the local environment tree that is upstream of the Mapping node that you need to modify.

The mapping routine qualified name that is provided in the MappingRoutine element must be defined in a map file that has to be deployed to the integration node in a BAR file where the message flow is deployed.

You can use any of the following message flow nodes to set the value of the local environment MappingRoutine element:
  • Mapping node
  • Compute node
  • JavaCompute node


To override at runtime the message map configured during development in a Mapping node, you must complete the following steps:

  1. Required: Reference a message map in the Mapping node. This is the default message map executed by the Mapping node. For more information, see Referencing an existing message map from a Mapping node.

    You must configure the name of the mapping routine that contains the statements to execute against the database or the message tree in the Mapping node property Mapping Routine. By default, the name that is assigned to the mapping routine is: {default_broker_schema}:DefaultMsgFlowName_MappingNodeName, where default_broker_schema is the broker schema where the message flow is located, and DefaultMsgFlowName_MappingNodeName is the name of the message flow concatenated with the name of the Mapping node.

  2. In your message flow, add a new Mapping node located before the Mapping node where you want to assign dynamically a message map. Then complete the following configuration steps in the new Mapping node:
    1. Add the local environment tree to the input message assembly.
    2. Add the local environment tree to the output message assembly.
    3. Optional: Add database tables if you require information available in an external database.
    4. Configure a Move transform between the input local environment tree and the output local environment tree.
    5. Configure a transform to set the output local environment tree MappingRoutine element. You can also add a condition to the transform.

      You must define the value for LocalEnvironment > Mapping > MappingRoutine.

      A light bulb will appear on the left hand side of the transform.

    6. Click the yellow light bulb, and then select Group the conflicting transforms in an override group.


You have configured your message flow to dynamically assign a message map to a Mapping node. In the first Mapping node, you have defined the logic to set the local environment MappingRoutine value. In the Mapping node where you want to dynamically assign a message map, you have defined a message map.