{{tag>Index Glossary Rule_Priority Business_Rule Business_Object}} ===== Rule priority ===== When [[glossary:action|actions]] for [[glossary:rule|rules]] in an [[glossary:rule_collection|unordered rule collection]] are executed their [[glossary:rule_execution_order|execution order]] is undefined. Most rules are independent of other rules so the execution order is not important. In those rare cases when an action should be executed before or after actions of some other rules in the collection, this can be achieved by setting the rule priority higher or lower than that of the other rules. For example, a final discount may need to be applied to an insurance policy after all other calculations on the policy have been completed. **//[[glossary:aware_im]]//** automatically sets different rule priority to certain actions. For example, if the action of an object rule generates a document from a [[glossary:document_template|template]], the rule priority is lower to allow all [[glossary:attribute|attributes]] to be calculated before the document is created.