Trading Networks 10.11 | Administering Trading Networks | Creating XML Document Types | Before You Begin | Creating Custom Transformations for Extracted Attributes
 
Creating Custom Transformations for Extracted Attributes
You can create your own services to transform extracted attributes. Base each service on the appropriate specification as listed in the following table:
Data Type
Specification to Use
DATETIME or DATETIME LIST
wm.tn.rec:DateAttributeTransformService
STRING or STRING LIST
wm.tn.rec:StringAttributeTransformService
NUMBER or NUMBER LIST
wm.tn.rec:NumberAttributeTransformService.
Trading Networks passes the input variables listed in the following table:
Input Value
Meaning
values
One or more values for your service to transform.
The values might be null or an empty (zero length) string. For an array data type (for example, DATETIME LIST), any element in the values array can be null or an empty string. Make sure your custom transformation service can handle null values or empty strings.
isArray
Whether values contains a single value (false) to transform or multiple values (true) to transform.
arg
Optional arguments you define.
Trading Networks expects you to return the transformed values in the newValues output variable listed in the following table:
Return...
For...
Date List
DATETIME or DATETIME LIST
String List
STRING or STRING LIST
Number List
NUMBER or NUMBER LIST
If the input variable isArray is false, your service should transform the single item and save just a single item in the output variable newValues.
If the input variable isArray is true, your service should loop through the items in the values variable and transform each one. It should store each as an item in the output variable newValues. For example, if you are transforming string data, newValues is a Date List of the transformed Strings.