Differences

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

Link to this comparison view

Both sides previous revision Previous revision
3400_how_to:0400_business_rules [2026/08/13 07:33] – Imported by DokuWiki Advanced Plugin aware_support33400_how_to:0400_business_rules [2026/08/13 07:43] (current) – Imported by DokuWiki Advanced Plugin aware_support3
Line 11: Line 11:
  
 <anchor id="define_a_rule"> <anchor id="define_a_rule">
-<accordion-item title="define a rule" type="primary">+<accordion-item title="define a rule">
 Most business rules are evaluated when a particular business object is created or modified and therefore most rules are attached to business objects. Some rules may also be attached to notifications (they are evaluated when a notification is created or received) or to timer events (scheduling rules). A rule consists of a condition (which is optional) and actions. To define a rule you need to specify these conditions and actions using the Rule Language. To make this task simpler //**AwareIM**// provides the Context Assistant, which prompts you for the right actions and conditional expressions to use when defining a rule. You can also use the information provided in the [[:3000_rule_language|AwareIM Rule Language Reference]] section. Most business rules are evaluated when a particular business object is created or modified and therefore most rules are attached to business objects. Some rules may also be attached to notifications (they are evaluated when a notification is created or received) or to timer events (scheduling rules). A rule consists of a condition (which is optional) and actions. To define a rule you need to specify these conditions and actions using the Rule Language. To make this task simpler //**AwareIM**// provides the Context Assistant, which prompts you for the right actions and conditional expressions to use when defining a rule. You can also use the information provided in the [[:3000_rule_language|AwareIM Rule Language Reference]] section.
 </accordion-item> </accordion-item>
  
 <anchor id="find_a_rule"> <anchor id="find_a_rule">
-<accordion-item title="find a rule" type="primary">+<accordion-item title="find a rule">
 An application that you configure may have many rules. If you want to find a particular rule in the Configuration Tool you can use “Search Rules” functionality – see the [[2500_config_apps:0400_finding_element_usage|Searching Rules]] section. You can also use various filtering options available in the Rule Collection Editor. The Rule Collection Editor may display all rules in the application or only rules attached to a particular business object or notification – see the “[[2500_config_apps:0800_add_edit_rules:0100_working_rule_collections|Working with Rule Collection Editor]]” section. An application that you configure may have many rules. If you want to find a particular rule in the Configuration Tool you can use “Search Rules” functionality – see the [[2500_config_apps:0400_finding_element_usage|Searching Rules]] section. You can also use various filtering options available in the Rule Collection Editor. The Rule Collection Editor may display all rules in the application or only rules attached to a particular business object or notification – see the “[[2500_config_apps:0800_add_edit_rules:0100_working_rule_collections|Working with Rule Collection Editor]]” section.
 </accordion-item> </accordion-item>
  
 <anchor id="deal_with_rules_that_need_to_be_evaluated_in_a_strict_order"> <anchor id="deal_with_rules_that_need_to_be_evaluated_in_a_strict_order">
-<accordion-item title="deal with rules that need to be evaluated in a strict order" type="primary">+<accordion-item title="deal with rules that need to be evaluated in a strict order">
 Quite often you are dealing with the situation when rules need to be evaluated only after the action of the previous rule has been executed, i.e you seem to be dealing with the ordered sequence of rules. However, in //**AwareIM**// most rule sequences are un-ordered (except processes that have “Maintain Order” property checked), i.e. //**AwareIM**// does not guarantee the order in which rules will be evaluated (see the “[[2000_concepts:0800_data_processing:0100_rule_evaluation|Rule Evaluation]]” section).  Quite often you are dealing with the situation when rules need to be evaluated only after the action of the previous rule has been executed, i.e you seem to be dealing with the ordered sequence of rules. However, in //**AwareIM**// most rule sequences are un-ordered (except processes that have “Maintain Order” property checked), i.e. //**AwareIM**// does not guarantee the order in which rules will be evaluated (see the “[[2000_concepts:0800_data_processing:0100_rule_evaluation|Rule Evaluation]]” section). 
  
Line 28: Line 28:
  
 <anchor id="make_sure_that_action_is_executed_only_once"> <anchor id="make_sure_that_action_is_executed_only_once">
-<accordion-item title="make sure that action is executed only once" type="primary">+<accordion-item title="make sure that action is executed only once">
 Most rules in //**AwareIM**// are un-ordered, i.e. //**AwareIM**// does not guarantee the order in which the rules will be evaluated. Consequently, the same rule may be submitted for evaluation several times and so its action may be executed several times as well (see the “[[2000_concepts:0800_data_processing:0100_rule_evaluation|Rule Evaluation]]” section). For actions that modify attribute values this is not a problem, provided that the last execution of the action sets the attribute to the correct value. //**AwareIM**// guarantees that this will be the case provided that rules are consistent and independent of one another.  Most rules in //**AwareIM**// are un-ordered, i.e. //**AwareIM**// does not guarantee the order in which the rules will be evaluated. Consequently, the same rule may be submitted for evaluation several times and so its action may be executed several times as well (see the “[[2000_concepts:0800_data_processing:0100_rule_evaluation|Rule Evaluation]]” section). For actions that modify attribute values this is not a problem, provided that the last execution of the action sets the attribute to the correct value. //**AwareIM**// guarantees that this will be the case provided that rules are consistent and independent of one another. 
  
Line 56: Line 56:
  
 <anchor id="perform_an_action_on_multiple_business_objects"> <anchor id="perform_an_action_on_multiple_business_objects">
-<accordion-item title="perform an action on multiple business objects" type="primary">+<accordion-item title="perform an action on multiple business objects">
 [[:3000_rule_language|AwareIM Rule Language]] is the language of rules only – it does not include variables or loops as programming languages do. Consequently, it is not possible to iterate over business objects. How can then an action be performed on several business objects? The answer is that any action is automatically performed on all objects that are in the current //context//. The context usually contains objects found by a query, so the action is performed on all found objects. For example, [[:3000_rule_language|AwareIM Rule Language]] is the language of rules only – it does not include variables or loops as programming languages do. Consequently, it is not possible to iterate over business objects. How can then an action be performed on several business objects? The answer is that any action is automatically performed on all objects that are in the current //context//. The context usually contains objects found by a query, so the action is performed on all found objects. For example,
  
Line 67: Line 67:
  
 <anchor id="check_whether_rules_are_executing_correctly"> <anchor id="check_whether_rules_are_executing_correctly">
-<accordion-item title="check whether rules are executing correctly" type="primary">+<accordion-item title="check whether rules are executing correctly">
 Execution of rules can be checked using the Execution Log and Log Viewer. See the “[[2000_concepts:0800_data_processing:0300_execution_log|Execution Log]]” section. Execution of rules can be checked using the Execution Log and Log Viewer. See the “[[2000_concepts:0800_data_processing:0300_execution_log|Execution Log]]” section.
 </accordion-item> </accordion-item>