Show pageOld revisionsBacklinksExport to PDFExport Page to HTML/PDFBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. {{tag>business_object business_logic business_rule concepts}} [<10>] ====== Business Rules as Carriers of Business Logic ====== 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. Here are some examples of rules: <code aim>IF Account.Holder.Age < 16 THEN REPORT ERROR 'Account holder must be 16 years old or over' </code> <code aim>LineItem.Total = LineItem.Price * LineItem.Quantity </code> <code aim>IF Reservation.Status WAS CHANGED TO 'Offered' Then SEND ReservaitonOfferEmail TO Reservation.Member </code> <code aim>REQUEST SERVICE ProcessPayment OF PaymentProcessingSystem </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. 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 //**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 [[docs: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 [[docs:2000_concepts:0800_data_processing:0100_rule_evaluation|Rule Evaluation]] section. Configuration of business rules is explained in detail in [[docs:2500_config_apps:0800_add_edit_rules|Adding/Editing Rules]], details of rule conditions and actions syntax is provided in the [[docs:3000_rule_language|Rule Language]] section and the “AwareIM Rule Language Reference” document. Last modified: 2025/07/23 01:39 Log In