Adapter Development Kit 6.5 | webMethods Adapter Development Kit Documentation | webMethods Adapter Development Kit Installation and User’s Documentation | Adapter Services | The Metadata Model for Adapter Services | Field Maps | Tuples
 
Tuples
The WmTemplateDescriptor.createTuple method is another grouping mechanism that you can use to modify:
*The behavior of a resource domain lookup.
*How resource domain values are applied to parameters in the tuple.
Members of a tuple are linked when the resource domain values are retrieved, and when the values are updated on the user interface. When the Adapter Service Editor performs a resource domain lookup for a parameter in a tuple, it expects the response array to contain a ResourceDomainValues object for each parameter in the tuple. Thus, changes resulting from the resource domain lookup will be applied simultaneously to each parameter in the tuple. This mechanism is particularly useful when two or more sequence parameters in a field map are closely related, for example when one parameter contains a column name and the other parameter contains the column format.
Requirements for reliable tuple operation are as follows:
*The parameters of a tuple must be sequence parameters of the same field map. If parameters are in separate field maps, the resource domain lookup will function properly, but the user interface characteristics described below will not function.
*A tuple must be declared (in the code) before a setResourceDomain method (see Associating Metadata Parameters with Resource Domains).
*The first parameter of a tuple must be assigned to a resource domain before any other member of the tuple (see Associating Metadata Parameters with Resource Domains).
*Each parameter of a tuple must have the same parameter dependencies listed in the setResourceDomain call that you used to assign the metadata parameters of the adapter service to a resource domain (as described in Associating Metadata Parameters with Resource Domains and Parameter Dependencies).
*For each ResourceDomainValues object returned in the lookup, the setComplete method must be true (meaning that adapter users cannot supply parameter values; see Populating Resource Domains with Values).
*The first parameter in the tuple must appear first in its group.
In the user interface, the first parameter in a tuple serves as the "master" parameter, and all other parameters are "slave" parameters. In the Adapter Service Editor, the adapter user may directly manipulate the master parameter, but not slave parameters. A slave parameter contains the value from its resource domain that corresponds to the value selected from the master parameter. For example, if the fourth member of the master parameter's resource domain is selected, then the fourth member of the slave parameter's resource domain will appear in the slave parameter's column. If a slave parameter does not have a value in the position corresponding to the master parameter's value, then the slave parameter is left blank in that row.