Handle data

Computers in general, and computer languages specifically, segregate everything they deal into types. Types are categories of things with which the expression works. When a thing has a type, the integration engine server knows how to behave with that thing.

This is a fundamental aspect of how the integration engine works. Without a named type for the abstract ideas that they work with, the integration engine servers do not know how to technically carry out basic things such as combining two different values. However, if you have two things, and they are of the same type, rules exist for combining or mapping them.

Six types of things are available in DML expressions. They cover all the data that the integration engine deals with. In this language, types are called classes.

  • Boolean
  • Boolean type is used for data that represent truth. Imagine you are dealing with an electronic invoice that states whether it has been paid or not. That information (paid or not paid) is typically stored in a Boolean data node. Booleans are basically numbers, restricted to the { 0, 1 } set for false and true. For convenience, reserved words true and false can be used in expressions to represent Boolean literal values true (1) and false (0).
  • This type is also referred to as class B.
  • Integer
  • Integer type includes all the positive natural numbers, their negatives, and zero. Unlike most of the computer languages, no difference is made between short and long integers. The integration engine server can compute numbers with at most 18 significant digits (technically 64-bit integers).
  • This type is also referred to as class I.
  • Real
  • This type is the one for floating-point numbers. In essence, the special distinction between a real and an integer is, that a real has a component that is a fraction of 1. Numbers such as 1.01, 2.34, 0.02324, and any other number that contains a fractional component is treated as a floating-point number. This is the type that you would want to use for dealing with money or with things dealt with in partial quantities, similar to gasoline or pairs of socks.
  • This type is also referred to as class R.
  • String
  • This type is for text data. Strings can include as many as characters needed: limited only by computer memory exhaustion. The integration engine server can handle any existing character, many encoding schemas are supported. Most of the time, you do not have to consider the technical aspects of encoding strings when using them in expressions.
  • This type is also referred to as class S.
  • Date
  • The date class is the type for single dates or complete time landmarks. The integration engine server can handles dates in the range of October 15th, 1582 to December 31st, 9999. This type is also referred to as class D.
  • Raw data
  • Raw data class is the type dedicated to receive amount of raw data with no specific signification and no limit in size. It can be seen as an array of bytes. This type is also referred to as class V.

Data computed in DML expressions can have regular values or symbolic values.

Regular values are the usual values for the class of the data. For example, .6022E23 is a regular value for class R. "Quick brown fox over lazy dog" is a regular value of class S and false is a regular value for class B.

Two symbolic values are available for any data of any class: null and absent. The null value represents values that are impossible, such as the result of division by zero or getting the logarithm of a negative real. The absent value is for empty data. Imagine an electronic receipt which includes a field for a telephone number: the field is not optional so that, if no value is available, the absent symbolic value has to be used in place of a value.

Even if classes segregate data from each other, bridges exist to map data between different types. This mechanism is called implicit conversion. The problem arises when you want to combine values of different classes, as in the following expression:

5 * 3.1416 + 28

This expression deals with class R and class I numbers. For the calculations executed by human beings, this is not a problem. But for a computer, real numbers cannot be multiplied directly with integers: 5 (class I) has to be mapped in 5.0 (class R) and then yields a result that is class R.

In DML expressions, this mechanism is kept hidden from you: the integration engine server is clever enough to automatically decide to convert 5 (I) into 5.0 (R). Not all conversions are possible. The following graphic shows which conversions are possible and which are not.

Possible conversions

The arrows show implicit conversions that the integration engine server can perform. Implicit conversions always map data of a specialized class into data of a more general class. For instance, real numbers are a generalization of integer numbers just as a fruit is a generalization of orange, mango, banana and many more. This is why implicit conversions are also called promotions.

Kinds of transitive operations can also be performed: when required, the integration engine can directly map the Boolean value true into the string ".1e+1". First true is turned into integer-type number 1, then into real-type number 1.0 that is finally converted into string ".1e+1".

Related Links