Declarations

Definition

By defining a declaration, you introduce a new variable to use in a rule or condition.

A variable that is not first declared, cannot be used, as it is unknown in RuLa.

Examples of declarations:

c is Contract
e is Entity
p is Person, AccountHolder

You need to declare a variable in every rule or condition you write.

The Impact of a Declaration

How you formulate a declaration, has its impact on what a rule will be about. If, on a document, you declare these variables

c is Contract
p is Person

that document will need to contain one contract and one person.

Alternatively, if you declare

p is Person

that document will be about exactly one person. In a case that involves not one but three people, the system will require this document three times: once for each person in the case.

However, if you declare

p1 is Person
p2 is Person
p3 is Person

on a document, that document can contain all three people in the case. It will only be required once.

If you are not certain about the exact number of people in a case, for example you know it will be at least two, but it could go up to five, use the following declaration with the operator optional:

p1 is Person
p2 is Person
p3 is optional Person
p4 is optional Person
p5 is optional Person

A document where this is declared will be required if there are at least two people in the case, but up to five will be matched.