Rule-Aware Objects
Promotion Engine and Rule Engine use rule-aware objects (RAOs) to provide the facts required to evaluate rules and apply actions. In addition to the standard set of promotions RAOs, you can create custom RAOs.
Use Case
Both Promotion Engine and Rule Engine allow you to evaluate a set of facts from the application, then define actions based on whether the evaluation is true or false.
Therefore, both engines require a certain set of application data that provide the facts or context for rule evaluation. All of the data necessary for both conditions and actions must be made available to the Rule Engine for processing.
For example, in Promotion Engine, promotion rule conditions may evaluate the cart (for example, checking for products and prices) or the customer (for example, checking the customer group). Promotion actions can include, for example, discounts on products or on the cart.
Hence, it is necessary to represent and propagate data from SAP Commerce into the rule context as a set of facts. In addition, it is necessary to define actions that will be executed as a result of rule evaluation, and make these available to the application for processing.
This is done with Rule-Aware Objects (RAOs), which are plain old java objects (POJOs).