A special set of operators is provided in the Corticon.js 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 String
.toDateTime String DateTime

The problems shown in Datatype mismatches in comparision expressions can use these casting operators to make corrections:

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.