Operations in business rule conditions

Operations appear between the left and right expressions. In rule conditions, operations specify how the left expression is compared against the right expression. Each rule condition row requires an operation. There are three types of operations:

  • Comparison
  • Unary
  • Functional

Comparison operations

Comparison operations require both left and right expressions. Both expressions must evaluate to the same type. The comparison operations are:

Operation

Description

=

Left expression is equal to the right expression.

Is Not Equal To

Left expression is not equal to the right expression.

<

Left expression is less than the right expression.

<=

Left expression is less than or equal to the right expression.

>

Left expression is greater than the right expression.

>=

Left expression is greater than or equal to the right expression.

The following example conditions use comparison operations:

  • vehicles.length >= 5
  • vehicle.GarageLocation.PostalCode Is Not Equal To null

Monetary expressions

When using monetary amount properties in operations in the rule condition builder, drill down to the appropriate Amount property to avoid validation errors.

For example:

  • hopDwelling.Branch.PaymentAmount.Amount < 1000.00

Unary operations

Unary operations require only a left expression. For Is True and Is False, the expression must evaluate to a Boolean.

Operation

Description

Is True

Left expression is true.

Is False

Left expression is false.

Has a Value

Left expression has a value. The expression does not evaluate to null.

Has No Value

Left expression evaluates to null.

The following example conditions use Boolean operations:

  • policyDrivers.isEmpty() Is True
  • personalAutoLine.PAPIP_ARExists Is False

Functional operations

Functional operations require both left and right expressions.

Operation

Description

Is In

Item in the left expression is contained in the list in the right expression.

Is Not In

Item in the left expression is not contained in the list in the right expression.

Contains

List in the left expression contains at least one item matching the condition in the right expression.

Does Not Contain

List in the left expression does not contain any item matching the condition in the right expression.

For Is In and Is Not In, the right expression must evaluate to a list, and the left expression must evaluate to a type matching an item in the list.

For Contains and Does Not Contain, the left expression must evaluate to a list, and the right expression specifies a condition that items in the left expression are compared against.

The following conditions use functional operations:

  • policyPeriod.BaseState Is In "California", "Oregon", "Washington"
  • policyPeriod.AllCosts Contains a cost where cost.ActualAmount >= cost.ActualTermAmount