A special set of operators is provided in the Corticon Studio's Operator Vocabulary that allows the rule modeler to control the data types of attributes and expressions. These casting operators are described below:

Table 1. Special casting operators
Casting operator Applies to data of type… Produces data of type…
.toInteger Decimal, String Integer
.toDecimal Integer, String Decimal
.toString Integer, Decimal, DateTime, Date, Time String
.toDateTime String, Date, Time DateTime
.toDate DateTime Date
.toTime DateTime Time

Returning to Datatype Mismatches in Comparision Expressions, we use these casting operators to correct some of the previous problems:

Figure 1. Using casting operators

Casting operators were used in actions rules B and C to make the data types of the LHS and RHS match. Notice, however, that no casting operator exists to cast a Decimal into a Boolean data type for action E, hence the error.