Show TOC

Background documentationModes of Operation Locate this document in the navigation structure

 

BRFplus provides three modes of operation for processing the function. They are Functional mode, Event mode and Functional and Event Mode.

Functional Mode

Functional mode requires a top expression to be assigned to the function. During processing, the function triggers and evaluates the top expression. The top expression can use a number of expressions to find a result. The result of the top expression is the result generated for the function. For example, a decision table can be assigned as a top expression to a function. The context data objects are input which is used in the columns of the decision table to formulate the conditions. As a result, the decision table nests a formula expression. The result of the decision table is returned as the function result. Typically, the functional mode is used for simpler use cases with a clear output of the function.

Event Mode

Event mode uses rulesets to trigger the process instead of a top expression. A number of rulesets can exist for the function. Whenever a function is processed in the event mode, it checks if the rulesets are registered. Rulesets contain a number of rules. A rule consists of a condition and an action part. These rules with additional restrictions determined by pre-conditions, time dependency, enabled or disabled status are fired when the function is processed. When the condition in the rule is satisfied, the action is processed. Action can simply change the values in the context or can trigger additional actions, such as starting a workflow or writing error messages to a log. Rulesets also contain other expressions such as decision table or formula expressions. Typically, the event mode is used for more complex use cases and for use cases where a result is not needed.

Functional and Event Mode

Functional and Event mode is a mixture of the functional mode and the event mode. It works with a top expression and a result is returned. However, rules can be fired so that actions change the context.