Process Rule

Definition

A process rule is a general rule that guides a process. It is a special concept in atfinity, since it lives on its own.

A process rule always results in one of these outcomes:

Outcome

Description

Issue / Warning

Raise an issue or warning when the provided information in a case matches the condition described in the process rule.

Creation

Specify a condition under which you want atfinity to create something - and specify what you want to have created when the condition is met in a dedicated 'creation' field.

Assignment

Assign a specified value, if it does not already exist.

Process rules are written in RuLa, atfinity's rule language, just like the rules and conditions that are attached to documents. The difference is:

  • Rules attached to processes raise issues or result in creations or assignments.

  • Rules attached to a document make sure the document is required in a case when conditions for it are met.

When naming a process rule, it is most effective to pick a name that says what the rule is for. Examples:

  • 'Two account holders required for joint account'

  • 'Applicant for entity account must be of low risk class'

  • 'Individual account is not available for people from risk countries'

Issue / Warning

Option

Description

Condition

Using RuLa, describe when the process rule should be triggered, resulting in a raised issue or a warning.

Title

The summary of the rule in English.

Description

Describe why the situation in question is problematic and causes the raised issue or warning. If there is anything the user can do to correct the situation, suggest it here. The provided description should be in English.

Example of a condition for the process rule 'Account holder cannot have a domicile in a risk country', with outcome Issue or Warning:

p is Person, AccountHolder
p.domicile not in RiskCountries

Line 2 in this example shows how a process rule works by bringing an ontology and a piece of information together. The p refers to the ontology Person, as defined on line 1.

Then, in line 2, what follows after the period sign . is the piece of information on that ontology you want the process to look at, in this example the domicile of the person.

A second example of a process rule that results in a warning, this time whenever a politically active person wants to open an account:

p is Person
p.politically_active = true

Creation

Option

Description

Condition

Using RuLa, describe when the process rule should be triggered, resulting in the creation of instances with specified roles.

Creation

Again, using RuLa, describe what should be created when this rule is triggered.

Example of a condition for the Process Rule 'Two account holders required for joint account':

c is Contract
c.account_type = joint_account

Under 'Creation', you would then write:

ensure 2 AccountHolder

If we look at this example: somewhere in the case the information field account_type exists. The process rule looks at that field and evaluates whether or not the value that was input there is joint_account.

Use the exact term of the role or ontology, here: AccountHolder, even though we're dealing with the creation of 2. The role 'AccountHolders' does not exist, so writing that here will cause an error.

Note that the system will only make sure that two account holders exist, not necessarily create two of them. If the case already contains two nothing will be created.

Role and Ontology

If you would like to make sure that these account holders are not just of the role AccountHolder, but also the ontology Person, you can specify this in addition:

ensure 2 Person, AccountHolder

Calculating how many to create

The number of instances to create doesn't have to be an integer. It can also be any RuLa expression. Instead of an integer, a calculation is also a valid number here:

ensure 1 + 1 Person, AccountHolder

It is also valid to reference any matches of the condition and use their information. Here, we use the match c is Contract from our condition above:

ensure c.number_of_account_holders Person

Assignment

Option

Description

Condition

Using RuLa, describe when the process rule should be triggered, resulting in the assignment of a value.

Assignments

Describe what value should be assigned.

Example 1:

If you want to assign the value for a person's tax country to be whatever value is given as that person's domicile, first, in the condition field, write:

p is Person

Then, in the assignments field, follow that by:

p.tax_country := p.domicile

Example 2:

A process rule ensuring that, whenever a client indicates email is the preferred channel of communication, e-banking is offered as an additional service:

p is Person
p.communication_channel = email
p.recommended_services = ebanking

A step-by-step guide on how to write process rules can be found here.

Interactions

Process rules make atfinity dynamic.They interact with:

  • Process: process rules need to be added to a process, in order to be used and evaluated.

  • Ontology and Information: a process rule looks at ontologies and the information known about them, and evaluates whether to act on them or not.