Using a User-Defined Extension Function in a Map

After you create a user-defined extension function and add it to the MAPexpression.xml file, you can use the function in a transformation rule for an element in your map.

To call the user-defined function in a map:

  1. In the Orchestration Navigator, double-click your map.
    The source and target schemas display in the Map Editor.

  2. To map a connection, drag the source element or attribute you want to map and drop it on the target element or attribute.
    If the connection is valid, a map link graphically connects the two.

  3. To define the rules of your transformation, double-click the link.
    The Transformation Rule Builder opens displaying the expression string.

  4. Build your transformation rule.

Note: When you reference the extension function in your transformation rule, you must use the prefix that corresponds with the definition in the MAPexpressions.xml file. Enter <prefix> : <function name> in your rule.  For example: syexts: DateTimeFunctions.currentDateTime()

  1. To save your changes, select File>Save mapName.map from the menu bar.
    The save operation completes if the string is syntactically correct.

  2. View the transformation in the XSLT.
    Choose expressions appear in the .xsl file as <xsl:choose>.

  3. Make the extension function available for use in maps.

The final step in the process is testing your maps.