Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
2000_concepts:0200_basics:0200_business_rules_carriers_business_logic [2022/08/22 02:12] – ↷ Links adapted because of a move operation administrator2000_concepts:0200_basics:0200_business_rules_carriers_business_logic [2026/08/13 00:57] (current) – ↷ Links adapted because of a move operation localdev
Line 1: Line 1:
 +{{tag>business_object business_logic business_rule concepts}}
 [<10>] [<10>]
 ====== Business Rules as Carriers of Business Logic ====== ====== Business Rules as Carriers of Business Logic ======
  
-In //**Aware IM**// data processing (or business logic) is encapsulated in //business rules//.  +In //**AwareIM**// 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.  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. 
Line 9: Line 10:
  
 <code aim>IF Account.Holder.Age < 16 THEN   <code aim>IF Account.Holder.Age < 16 THEN  
-  REPORT ERROR 'Account holder must be 16 years old or over'</code> +  REPORT ERROR 'Account holder must be 16 years old or over' </code> 
-<code aim>LineItem.Total = LineItem.Price * LineItem.Quantity </code>+<code aim>LineItem.Total = LineItem.Price * LineItem.Quantity  </code>
 <code aim>IF Reservation.Status WAS CHANGED TO 'Offered' Then  <code aim>IF Reservation.Status WAS CHANGED TO 'Offered' Then 
-  SEND ReservaitonOfferEmail TO Reservation.Member</code> +  SEND ReservaitonOfferEmail TO Reservation.Member </code> 
-<code aim>REQUEST SERVICE ProcessPayment OF PaymentProcessingSystem </code> +<code aim>REQUEST SERVICE ProcessPayment OF PaymentProcessingSystem  </code> 
-<code aim>IF Fee.Status='Applied' THEN PROTECT Fee.Amount FROM ALL </code>+<code aim>IF Fee.Status='Applied' THEN PROTECT Fee.Amount FROM ALL  </code>
  
  
 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. 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. +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 //**AwareIM**// 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 [[2000_concepts:0800_data_processing:0100_rule_evaluation|Rule Evaluation]] section.+When a value of an attribute changes //**AwareIM**// 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. //**AwareIM**// continues this process of rule evaluation until there are no more actions to execute. This process is described in detail in the [[2000_concepts:0800_data_processing:0100_rule_evaluation|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 [[2000_concepts:0800_data_processing:0100_rule_evaluation|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 [[2000_concepts:0800_data_processing:0100_rule_evaluation|Rule Evaluation]] section.
  
-Configuration of business rules is explained in detail in [[2500_config_apps:0800_add_edit_rules:0000_start|Adding/Editing Rules]], details of rule conditions and actions syntax is provided in the [[3000_rule_language:0000_start|Rule Language]] section and the “Aware IM Rule Language Reference” document.+Configuration of business rules is explained in detail in [[2500_config_apps:0800_add_edit_rules|Adding/Editing Rules]], details of rule conditions and actions syntax is provided in the [[:3000_rule_language|Rule Language]] section and the “AwareIM Rule Language Reference” document.