Expressions

An expression is a formula for obtaining a result. There are several places in the Process Engine system where you can enter expressions, including route properties, data field definitions, and search criteria.

Depending on the context, expressions can be simple or complex.

Expression examples

For examples of both complex and simple expressions, select a topic from the list below. The examples are grouped according to the expression type (that is, the data type of the result produced by the expression).

numeric (integer and float) expressions
string expressions
Boolean expressions
time expressions

Numeric expression examples

In the following numeric expressions, Num1 and Num2 are variables and can be declared as either floats or integers.

(Num1 + 2) * (Num2 * 15)

abs (Num1 - Num2)

Num1

String expression examples

In the following example, the variable CustName was declared as a string. CustName has a value of "International Insurance Company".

String Result

"Dear " + CustName + ","

Dear International Insurance Company,

The following example shows the use of the FileNet-supplied function called upper.

String Result

upper(CustName)

INTERNATIONAL INSURANCE COMPANY

Remember that an expression can also be a single variable, such as:

CustName

Boolean expression examples

In the following example, the variables EndOfFile and IsEmpty were declared as Booleans.

not EndOfFile and IsEmpty

Following is another example of a Boolean expression. The variable Num was declared as an integer.

((Num + 2) > 80) or ((Num - 2) < -20)

The Boolean expression shown below is also valid (remember that true is a Boolean literal).

true

Time expression examples

The following example converts a string literal to a time.

convert ("8/15/1995 14:30:00", time)

The example below adds three months to the server's current time.

addmonths (systemtime(), 3)

A time expression can also be a single variable, such as:

CustomerBirthDate