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:
1
c is Contract
2
e is Entity
3
p is Person, AccountHolder
Copied!
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
1
c is Contract
2
p is Person
Copied!
that document will need to contain one contract and one person.
Alternatively, if you declare
1
p is Person
Copied!
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
1
p1 is Person
2
p2 is Person
3
p3 is Person
Copied!
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:
1
p1 is Person
2
p2 is Person
3
p3 is optional Person
4
p4 is optional Person
5
p5 is optional Person
Copied!
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.
Last modified 9mo ago