Understanding Data Model Validation Understanding Rule Validation Understanding Decision Table Validation

4-20 Oracle Fusion Middleware Users Guide for Oracle Business Rules Figure 4–29 Validation Warnings Shown in Log and On Screen with Wavy Underline If a dictionary is invalid, you can save the dictionary. However, you can only generate RL Language for a dictionary that is valid and does not display warnings in the Rules Designer validation log. In the validation log, each validation message includes the following: ■ Message: The message provides details on the Oracle Business Rules exception that describes the problem. ■ Dictionary Object: This field displays a path that indicates details that should allow you to identify a component in the dictionary. ■ Property: provides information on a property of the object associated with the warning message. When you are viewing the validation log, if you select an item and then right-click and select from the list Select and Highlight Object in Editor, Rules Designer moves the cursor to select the dictionary object. Note that for some validation warnings this functionality is not possible.

4.4.1 Understanding Data Model Validation

Rules Designer performs dictionary validation when you make any change to the dictionary. When Rules Designer displays a warning message, the validation log includes a message that should assist you in locating the dictionary object that caused the validation warning. For example, the following string indicates that the warning originates from the data model object named RLFact_1. In addition, the problem is in the property named test_int: CarRentalData ModelRLFact_1test_intExpression Working with Rulesets and Rules 4-21 Table 4–3 specifies the parts of the dictionary object name specified in a validation message. For more information, see: ■ Section 4.4.2, Understanding Rule Validation ■ Section 4.4.3, Understanding Decision Table Validation ■ Section 4.4.4, How to Validate a Dictionary

4.4.2 Understanding Rule Validation

When you click the Validate icon Rules Designer displays the validation log. When you first add a rule you see validation warnings similar to those shown in Figure 4–30 . Figure 4–30 Rules Validation Messages The dictionary object name part of a validation message for a rule includes details that help you to identify the ruleset, the rule, and an area in the rule that is associated with the validation warning. For example, the following dictionary object specification indicates a problem: OracleRules1Ruleset_2Rules_1Pattern[1] In validation messages, the dictionary object name for a rule uses indexes that start at 1. Thus, the first pattern is Pattern[1]. In addition to validating rules, you can also test them in Rules Designer as you are designing them. For more information, see Section 8.1.1, How to Test Rules Using a Test Function in Rules Designer .

4.4.3 Understanding Decision Table Validation

When you click the Validate icon Rules Designer displays the validation log. When you first add a Decision Table you see validation warnings similar to those shown in Figure 4–31 . Table 4–3 Data Model Dictionary Property in Validation Log Name Description CarRental Dictionary Name Data Model Data Model component in dictionary. RLFact_1 Element name in data model test_int Property name in the specified element. Expression Expression part of property. 4-22 Oracle Fusion Middleware Users Guide for Oracle Business Rules Figure 4–31 Decision Table Validation Messages The dictionary object name part of a validation message for a Decision Table includes details that help you to identify the area of the Decision Table that is associated with the validation warning. For example, the following dictionary object specification indicates a problem in the first action row, and the first action cell of the Decision Table: OR1Ruleset_1DecisionTable_1Action[1]Action Cell[1] In validation messages the dictionary object name for a Decision Table object uses indexes that start at 1. For example, to indicate the first condition cell in the first row in the Conditions area, the message is as follows: OracleRules1Ruleset_1DecisionTable_2Condition[1]Condition Cell[1] This specification indicates the condition cell for the rule with the label R1 in the first row of the Conditions area in a Decision Table as shown in Figure 4–32 . Working with Rulesets and Rules 4-23 Figure 4–32 Decision Table with Warning on a Condition Cell

4.4.4 How to Validate a Dictionary