IBM Integration Bus, Version 9.0.0.8 Operating Systems: AIX, HP-Itanium, Linux, Solaris, Windows, z/OS

See information about the latest product version

Create

You can use the Create transform to initialize an output element, set an output element to nil, or set an output element to fixed value defined by the schema.

Overview

For simple types, you cannot use the value of an input element to set the value of an output element in a Create transform.

However, you can define zero or more supplement connections between input elements and the Create transform. You can then use these input elements in a conditional expression that defines the condition under which the transform should be applied.

Create transform with two supplement connections from input elements

You can use the Create transform to create the following types of ouput element:

Set the value of a string type output element

By default, the option Create empty is preselected. This is the option that you must choose to initialize a single type output element.

For example, for an element defined in the schema model as <element name="Postcode" type="string" nillable="true" default="30567" />, you can choose any of the following options:
  • Create nil
  • Create using default or fixed value defined by schema for target type
  • Create empty

The following figure shows the properties view for the Create transform defined for that element:

Shows the properties view for the Create transform defined for that element

For example, if the output element is defined in the schema model as <element name="Postcode" type="string" nillable="false" />, you can only choose to create the output element as empty.

Create transform in the Graphical Data Mapping editor

The option to create a nil element is available only when the target is nillable.

The option to create a element with the default value is only available when the target has a default value defined in the schema file.

Set the value of a complex type output element

By default, the option Create empty is preselected. This is the option that you must choose to initialize complex output element.

Note: You can only initialize or set to nil complex output elements.

When you define a Create transform to initialize a complex type output element, a nested map is created containing the complex structure elements. You configure each element within the nested map individually, that is, you initialize, set to nil, or set to a default value each individual element.

Create transform in the Graphical Data Mapping editor for a complex output element

When you initialize a complex type, you can use the nested map associated with the Create transform to provide values for the child element. You can define and configure each element by using transforms that do not require an input, for example the Assign transform, an xs:type transform, or the Create transform. You can also wire supplemental input to enable you to Move input values to the child elements.

Shows the nested map of the Create transform for a complex type

When you define a Create transform to set to nil a complex type output element, a nested map is created containing the complex structure elements. You can get the error Transform contains nested errors if you try to configure any element within the nested map individually.

Shows the error when you select create complex element as nil, and some elements in the nested map have transforms defined initializing or setting a specific value for the element

Specify how the a simple data type element or attribute is created

You must specify how an output element or an attribute is created in the General tab of the Create transform properties view.

The following table lists simple data types, their default options preselected when you define a Create transform, and list of options you can choose to set the value of an output element of that type:

Table 1. Configuration choices available when you define a Create transform to set the value of an output element
Data type Default option Output element can be set to empty Output element can be set to nil (the element is defined as nillable="true") Output element can be set to fixed or default value (the default property is set in the schema)
String Create empty valid valid valid
Integer Create nil not valid valid valid
boolean Create nil not valid valid valid
date Create nil not valid valid valid
dateTime Create using default or fixed value defined by schema for target type not valid not valid valid
double Create using default or fixed value defined by schema for target type not valid not valid valid
float Create using default or fixed value defined by schema for target type not valid not valid valid
hexBinary Create empty valid valid valid
int Create using default or fixed value defined by schema for target type not valid not valid valid
time Create using default or fixed value defined by schema for target type not valid not valid valid

For example, for the following schema definition of an output element:

<element name="NewAddress" type="boolean" nillable="true" />

When you define a Create transform to set the value of a boolean element, you can only create the element as nil.

Shows the properties of a Create transform

For example, for the following schema definition of an output element:

<element name="NewAddress" type="boolean" nillable="false" />

When you define a Create transform to set the value of a boolean element, you can only specify a fixed value, and the choice is preselected.

Shows the properties of a Create transform

Define a conditional expression

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

When you define supplement connections, you can configure the following properties to define how those inputs are displayed in the message map:
  • Sort: You can sort the inputs to the transform by ascending order, descending order, case order, or data order.
  • Order: You can display the order of input connections to a transform. You can reorder them.

For more information on how to configure these properties, see Configuring a mapping transform properties.


cm28656_.htm | Last updated Friday, 21 July 2017