Accessing user-defined properties from a Mapping node

You can use a Mapping node to access properties that are associated with the message flow that contains the node.

About this task

To access these properties from a Mapping node, call the function iib:getUserDefinedProperty('propertyname') from a Custom XPath transform. The function returns a string that contains the property value, regardless of the original type of the property.

Note: In IBM® Integration Bus Version 10, the function mb:getUserDefinedProperty('propertyname') is deprecated. If you try to use this function, you get the following message: The function mb:getUserDefinedProperty in XPath mb:getUserDefinedProperty('UDP1') is deprecated. Use the corresponding "iib:" function instead.

Procedure

To access user-defined properties from a Mapping node, complete the following steps:

  1. Right-click the element for which you want to set the value by using a user-defined property, and click Add Assign.
  2. Click the down arrow on the transform and change the Assign transform to a Custom XPath transform.
  3. In the General tab of the Properties page for the Custom XPath transform, enter the following text:
    iib:getUserDefinedProperty('property_name')
    where property_name is the name of your user-defined property.

Results

You set the value of your element to a user-defined property. Now you can provide a value for the user-defined property dynamically by using the Integration API or a BAR file override.