Convert

The Convert transform implements a schema type cast on the input to match the output. If the type cast cannot be performed on the input instance value, an exception is thrown and the map processing stops.

Overview

Use the Convert transform to move a simple input element to an output element, when both elements are defined in the relevant schema models with different types.

You can only connect one input to the Convert transform. You must use a primary connection to connect the input element to the transform.

For example, you might have an input element with type xsd:int and an output element with type xsd:decimal. The Convert transform changes the input with an int type to an output with a decimal type.

Define when the transform is applied at run time

You can define multiple connections between input elements and the Convert transform. You can then use these input elements in a conditional expression that defines the condition under which the transform is applied. If the condition evaluates to true, the transform is applied.

To define the conditional expression, you can define an XPath expression or a call to a static method on an imported Java™ class. You can also create a complex expression comprising XPath, Java and extension functions such as iib:getUserDefinedProperty("propertyname").  

You configure the expression in the Condition tab that is available in the Properties page of the transform.

For more information, see Configuring the properties of a transform, Defining an XPath conditional expression for a transform and Defining a Java conditional expression for a transform.

You can use the input connected with a primary connection to the transform. To add more inputs, you can define supplement connections between input elements and the transform.