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 Contracte is Entityp is Person, AccountHolder
You need to declare a variable in every rule or condition you write.
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 Contractp 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 Personp2 is Personp3 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
p1 is Personp2 is Personp3 is optional Personp4 is optional Personp5 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.