In BRFplus, a rule object is used as the technical representation of a simple business rule to be applied to a particular business case. Rules can be adapted to the increasing complexity of business cases by adding additional actions or expressions to the rule, and by combining any number of rules to a rule set. Actually, rules can only be triggered in the context of a rule set to which a rule is assigned. They cannot be triggered as stand-alone objects.
A rule consists of an embracing If
condition tested by the system once the rule is triggered. Based on the result of the condition, the rule performs a set of operations. The condition must have a True
branch, whereas
the False
branch is optional.
Note
In addition to the integrated condition of each rule, you can make rule execution dependent on numerous other conditions, such as rule enablement, time dependency, and others. You can control these additional conditions in the context of the rule sets to which a rule is assigned.
In a rule, you can access and manipulate context data. This seems surprising at first glance because the rule itself does not have a context of its own. Rather, accessing context data from within a rule means accessing the context data that are available to the rule through the rule set to which the rule is assigned.
Note
One rule can be assigned to many rule sets. Therefore, the system grants the rule access only to those context data objects that all of the referencing rule sets have in common (that is, the intersection of all context data objects of all rule sets referencing the rule). This is necessary for consistency reasons.
The following operation types are supported:
Triggering an action
Processing an expression. The result of the expression can be used to update the context.
Initializing or updating context data objects