Concepts to Know : Tokens and Types : Token Type Compatibility : Compatibility Based on Token Type Hierarchy
 
Share this page                  
Compatibility Based on Token Type Hierarchy
The object hierarchies of typed objects in DataFlow follow the structure of the token type hierarchy as shown in TokenValued Hierarchy. Thus Java type checking will protect against most invalid uses.
Sometimes, however, type information may not be known until the execution of the graph, as is the case for record token types. In such instances, the DataFlow engine will raise incompatible token type exceptions when type errors are detected.
The source token type of an object must be the same as or more specific than the target token type, otherwise the compiler will generate an incompatible port type exception. Following the port type hierarchy described in TokenValued Hierarchy, if the source type is not the same as the target type, then the source type must appear above the target type.
For example, an input field of type float can be used with any operator accepting an input of type float, double, numeric, or scalar, but it cannot be used in place of an input field of any other type.