company logo

constraint - Constraint

Constraints can be defined for value validation or as constraint for view properties or transient properties. Constraints are defined as operand that defines the condition as Boolean operation. The constraint operand must be a valid expression within the class context of the class the property belongs to. The expression may refer to global variables as well as to class variables.

Defining a constraint for a transient property usually requires a source the constraint applies on. The constraint must be a valid expression in the context of the source.

Constraint expressions can be defined as inline expressions enclosed in { } or as operand expressions.

// simple operand

  age < 150

// inline expression as operand

{

VARIABLES

  int         sum_income;

PROCESS

  sum_income = income + partner(0).income;

  return (sum_income < income);

}