Setting the value of an output element by using a transform or a function

Use the Graphical Data Mapping editor to set the value of an output element by using an expression, a transform, or a function.

About this task

You can use a function or a transform to set the value of an output element, either by connecting the output element with an input element and then specifying a transform on the connection between them, or by specifying a transform directly on the output element. For information about creating connections and specifying transforms, see Editing message maps.

For information about all the functions and transforms that are available, see Transform types in the Graphical Data Mapping editor.

Transforms that support conditional control such as the If transform can use XPath 2.0 expressions, or invoke Java™ or ESQL functions.

Procedure

You can use any of the following mapping operations to map graphically your data in the Graphical Data Mapping editor

  • Core mapping transforms: You can use built-in structural and functional mapping operations, which enable you to graphically construct the required message transformations to build the output message. For more information, see Transform types in the Graphical Data Mapping editor.
  • Custom transforms: You can use custom transformations to build your own XPath 2.0, Java, or ESQL functions, which can be invoked to perform specialized transformations within the message map. For more information, see Transform types in the Graphical Data Mapping editor.
    • Custom Java transform. For more information, see Custom Java.
    • Custom XPath transform. For more information, see Custom XPath.
    • Custom ESQL transform. For more information, see Custom ESQL.
  • XPath functions (fn:functionName): You can use XPath 1.0 and XPath 2.0 functions to transform data in a message map. For more information about XPath, see the online document W3C XML Path Language (XPath) 2.0.
    Note: XPath 1.0 functions are valid XPath 2.0 expressions. You can use the XPath Expression Builder to generate simple XPath 1.0 expressions.
  • Database transforms:
    • You can use the Select transform to query one or more database tables, and retrieve data that you can use in the message map to set output element values, define conditions, or use as input to build other transforms conditions. Database tables can be set as additional outputs of a message map. For more information, see Selecting data from a table.
    • You can use a database routine transform to call a stored procedure or user-defined function from a database, and retrieve data that you can use in the message map to set output element values, define conditions, or use as input to build other transforms conditions.
      Note: For information about the support for stored procedures, see Support for stored procedures.

What to do next

Define transformations to set the value of output elements in your output message: