Show TOC

Function documentationValue Mapping Locate this document in the navigation structure

 

You use this function to define mappings for elements in an XML message. At runtime, the Value Mapping action replaces the source values with target values based on the mappings. You can replace specific values or all values in an XML document.

Features

When you create a new project, the system adds a new XML file named ValueMap.vmap to the Meta-Inf tab. The system displays the property values for the file on the Properties tab. You can import or export the file separately or as part of a project.

You can copy rules from one value map document and paste them to the value map document of another project.

You can import and export rules, sources, and mappings using CSV files.

Mapping Details

You can match source values with actual values in one of the following ways:

  • Equals

    The system matches the source value with the actual value at runtime.

  • Contains

    If the target value contains the source value, the system considers it a match and evaluates the target value.

  • Regex

    You can provide a valid regex for the source value, and the system checks it using the regex pattern match.

You can derive target values by entering &SourceValue and using functions. For example, to get the ceiling for the source value, you can enter ceiling(&SourceValue) as the target value. For more information about functions, see Expression Editor Functions.

Activities

After you select a source document, you must select the source document location for the mapping. A dialog with the tree structure of the selected XML document appears. The source document path is used for display and configuration purposes to show from where the XPath was selected and what mappings occur at the specified XPath location.

Example

You send a message with a work center ID of 1234 from the ERP system to a shop floor application. In the shop floor application, work center 1234 is named ABCD. You defined a mapping for it and use the Value Mapping action to replace 1234 with ABCD in the document.