Adding a Function to an Existing Mapping Rule

About this task

To add a function to an existing mapping rule:

Procedure

  1. Select the Function tab. In the Function tab, the list of available functions is displayed.
  2. From the Function tab, drag a function onto an existing mapping rule in the Mapping Editor.

    The source node of the mapping rule is assigned to the first parameter of the function. During run time, the value of the source node is provided to the first parameter of the function.

    The destination node of the mapping rule is assigned to the return type of the function. During run time, the return value of the function populates the destination node.

  3. If the function has more than one input parameter, you must assign the remaining input parameters using one of the following options:
    • Create links from other source nodes (as described in step 3 of Assigning a Function While Creating Maps) or from functions used in the current mapping rule.
    • Edit the assignment of input parameters using the Functions Properties dialog box. To open the Functions Properties dialog box double-click the function in the Mapping Editor.
  4. Optional: Add additional functions to the mapping rule using this same procedure. For more information, see Example: Chaining Multiple Functions.
  5. Optional: Test if the mapping rule is valid by right-clicking on the function in the mapping rule and selecting Apply Function Graph. If the mapping rule is valid, the square function icon or icons in the graphical representation of the mapping link are not displayed and a blue bar with small squares at each end is displayed (). If the mapping rule is not valid, the graphical representation of the mapping rule does not change, the function icons are still visible, (for example: ) and an error dialog opens.
    Note: A mapping rule with function or functions is considered valid if all the input parameters of the function or functions are assigned with values of the correct datatype and if the return value of the last function matches the datatype of the destination node. The input parameters of a function can be provided by source nodes or by the return type of other functions associated with that mapping rule.



Feedback | Notices


Timestamp icon Last updated: Wednesday, 15 June 2016


http://pic.dhe.ibm.com/infocenter/wci/v7r0m0/topic/com.ibm.wci.doc/map_assigning_functions_add_to_existing_rule.html