Designer 10.7 | webMethods Service Development Help | Mapping Data in Flow Services | About Linking Variables | Linking Variables of Different Data Types
 
Linking Variables of Different Data Types
 
Converting a String List to a Document List in the Pipeline
Converting Two String Lists to a Document List in the Pipeline
In the Pipeline view, you can link different, but compatible, data types to one another. For example, you could link a String value called AccountNumber to a String List called Accounts. At run time, the server automatically performs the structural transformation necessary to link the data in AccountNumber to Accounts. (In this case, the transformation will result in a single-element String List.) By linking different data types to one another, you can perform structural transformations.
If you link variables of different data types, keep the following points in mind:
*Not all data types can be linked to one another. You cannot link a Document (IData object) to a String, for instance. If two data types are incompatible, Designer will not allow you to link them to each other.
*You can only link a variable to another variable of the same primitive type. The primitive type refers to the data type of the variable when all dimensionality is removed. For example, the primitive type for a String List or a String Table would be String. Two exceptions to this rule are the following:
*Any variable can be linked to an Object or an Object List variable
*An Object can be linked to any data type.
If there is a type mismatch between the Object or Object List and the other variable at run time, Integration Server does not execute the link.
*Object and Object List variables constrained with an assigned Java class should be linked only to other Object and Object List variables of the same Java class or to Object and Object List variables of unknown type. Although Designer permits a link between constrained Objects with different Java classes, the run-time result is undefined. For more information about specifying Java classes for Objects, see Java Classes for Objects.
*When you link between scalar and array variables, you can specify which element of the array variable you want to link to or from. Scalar variables are those that hold a single value, such as String, Document, and Object. Array variables are those that hold multiple values, such as String List, String Table, Document List, and Object List. For example, you can link a String to the second element of a String List. Alternatively, you can link the second element in a String List to a String.
*When you link between scalar and array variables and you do not specify which element in the array variable that you want to link to or from, Designer uses the default behavior to determine the value of the target variable.
Related Topics
Converting a String List to a Document List in the Pipeline
Converting Two String Lists to a Document List in the Pipeline
Default Pipeline Rules for Linking to and from Array Variables
Java Classes for Objects