Configuring a generic type in the local environment tree by using the Add User-Defined function

You can use the Add User-Defined function to define variables in a message map that are defined in the local environment tree, such as in the Variables folder.

About this task

Sometimes you need to use information that is passed in a generic type variable in the local environment or other part of the message assembly. For example, you might need to calculate the output value of a different element in the message body that is based on a value provided by a preceding node in the local environment variables folder, as shown in the following example:
LocalEnvironment.Variables.value_name
In this example, Variables is a generic element, and you must define the required elements in it for each value_name. You can also set values in the output local environment, Destination.specific_node, to override the behavior of a following node. For example:
  • For routing in the message flow, the map could set:
    LocalEnvironment.Destination.RouterList.DestinationData[1].labelName
  • To set a parameter to issue a REST request:
    LocalEnvironment.Destination.REST.Parameters.parameter_name
    In this case, Parameters is a generic element, and you must define the required elements in it for each parameter_name.
  • To set an order in a filter, to be used by a LoopBack request:
    LocalEnvironment.Destination.Loopback.Request.filter.order[1].name
    In this case, the order is a generic element, and you must define the required elements in it for each name.

Procedure

To configure the local environment tree Variables or other generic element, so that you can use its elements as part of your transformations, complete the following steps:

  1. Identify the variables that you must add in your message map under the Variables folder.
  2. Use the Add User-Defined function to define one by one each variable in the message map. For more information, see Adding and renaming a user-defined element.
  3. Select the type for each user-defined variable. For more information, see Defining the structure of a complex user-defined element.

Results

You have a message assembly structure that includes the local environment tree, and its Variables folder includes an any element, and other elements.

What to do next

Define transforms between the input local environment tree and the output local environment tree. For more information, see Specifying a transform (mapping operation) and Transform types in the Graphical Data Mapping editor.