Mapping Data to Variables

After creating a variable, you must map data from the mediation operation to provide a value for the variable.

Procedure

  1. Click the Input tab of the route task.
    In the Input tab of a route task, the right-hand panel is labeled Rule Variables. The schema in the right-hand panel contains a list of the variables that you have defined for the route task.
  2. Use XPath expressions to provide a value for each variable in this schema. In the example shown, one variable named city is used to determine the destination of the message. In this example, the city specified in the search request is mapped to the variable named city. The value of the variable is then used in routing conditions to determine which target operation should receive the message.
    Mapping values to variables


    Note: The section Schema Components explains that schema components on the left side of the mapper are not validated against the message schema, and their data types are thus not guaranteed. Therefore, data used within XPath expressions on the right side of the mapper is treated as untyped strings. Simple drag-and-drop mappings are not affected. However, if you want to perform data type-dependent comparisons or operations, you must use the Constructor Functions on the Functions tab (for example, xsd:int()) to correctly specify the data type. For example, to add two integers, the XPath expression would be:

    xsd:int($MessageData/int1) + xsd:int($MessageData/int2)