Business Rules as Carriers of Business Logic

In Aware IM data processing (or business logic) is encapsulated in business rules.

A rule specifies one or more actions that should be executed when the rule conditions are met. Conditions are optional and if none are specified the actions are executed unconditionally. In other words a rule states what should happen and when.

Here are some examples of rules:

IF Account.Holder.Age < 16 THEN  
  REPORT ERROR 'Account holder must be 16 years old or over' 
LineItem.Total = LineItem.Price * LineItem.Quantity  
IF Reservation.Status WAS CHANGED TO 'Offered' Then 
  SEND ReservaitonOfferEmail TO Reservation.Member 
REQUEST SERVICE ProcessPayment OF PaymentProcessingSystem  
IF Fee.Status='Applied' THEN PROTECT Fee.Amount FROM ALL  

Actions of business rules can perform a variety of tasks. Most importantly they can create and modify business objects, i.e. perform data processing. They can also perform calculations, create or print documents, display information, exchange data with other software, etc.

Evaluation of rules is triggered when certain events happen inside the system. Most importantly rules are triggered when data is entered or edited or, in Aware IM terms, when business objects are created or modified.

When a value of an attribute changes Aware IM considers all rules related to the object and executes the actions of those rules for which the conditions are met. Note that execution of actions may have a ripple effect because an action may change values of other attributes which may in turn cause evaluation of other rules and so on. Aware IM continues this process of rule evaluation until there are no more actions to execute. This process is described in detail in the Rule Evaluation section.

There are also other events apart from the modification of a business object that may trigger rule evaluation and action execution – a full list of these events is provided in the Rule Evaluation section.

Configuration of business rules is explained in detail in Adding/Editing Rules, details of rule conditions and actions syntax is provided in the Rule Language section and the “Aware IM Rule Language Reference” document.

  • Last modified: 2023/07/31 04:34