From the list next to the Add icon, select Rule.

5-12 Oracle Fusion Middleware Users Guide for Oracle Business Rules

5. In the Action Editor dialog, to select action cells for all the rules, select the Always

Selected checkbox.

6. Repeat Step 2 through Step 5, as required to define additional actions for the

Decision Table. To set values for action cells in a decision table: 1. From Rules Designer, select a ruleset from the Rulesets navigation tab and select the Decision Table where you want to specify action cell values.

2. In the Actions area, check that the appropriate action cells are selected. If the

Always Selected checkbox is specified in the Action Editor dialog, then all action cells should be selected. If Always Selected is not selected, then select the appropriate action cells using the action cell checkbox.

3. In the Actions area, enter the appropriate value for parameterized properties for

each selected action cell. To do this select the action cell property cell, and either enter a value, select a value from the list, or click the Expression Builder icon to use the Expression Builder dialog. For more information on referring to a bucketset from a Decision Table, see Section 3.6.2, How to Define a List of Ranges Global Bucketset. To deselect an action cell in a decision table: 1. From Rules Designer select a ruleset from the Rulesets navigation tab and select the Decision Table where you want deselect an action cell.

2. In the Actions area, select the action cell and deselect the checkbox in the action

cell. You are not allowed to deselect action cell values when Always Selected is selected for the action. When you add actions, you may need to change the order of the actions. In Rules Designer you can use the Move Down icon or Move Up icon to change the order of actions.

5.2.4 How to Add a Rule to a Decision Table

You can add a rule to a Decision Table. Rules Designer adds a column for the rule to the left of the existing rules and each condition cell is initialized to ?, which actually means a validation error prompting you to populate the cell with relevant values. To add a rule to a decision table: 1. From Rules Designer select a ruleset from the Rulesets navigation tab and select the Decision Table where you want to add the rule.

2. From the list next to the Add icon, select Rule.

3. Enter values for the condition cells. Notice that the new rule is added as the first rule of the Decision Table on the left and the other rules have moved as required to keep the bucket values in their defined order. 4. Enter values for the action cells. Constant Select to specify a constant value. Table 5–2 Cont. Action Editor Dialog Arguments Fields Field Description Working with Decision Tables 5-13

5.3 Performing Operations on Decision Tables

After you create a Decision Table there are operations that you may want to perform on the Decision Table, including the following: ■ Compact or split cells in a Decision Table ■ Merge a condition or split a condition in a Decision Table ■ Finding and resolving conflicts between rules in a Decision Table ■ Find and fix gaps in a Decision Table

5.3.1 Introduction to Decision Table Operations

After you create a Decision Table you may want to modify the contents of the Decision Table to produce a Decision Table that includes a complete set of rules for all cases, or to produce a Decision Table that provides the least number of rules for the cases.

5.3.1.1 Understanding Decision Table Split and Compact Operations

The split and compact operations allow you to manipulate the contents of the condition cells in a Decision Table. The split table operation creates a rule for every combination of buckets across the conditions. For example, in a Decision Table with 3 boolean conditions, 2 x 2 x 2 = 8 rules are created. In a Decision Table with 32 boolean conditions, 232 ~ 2 billion rules are created. Thus, you only use split table when the number of rules created is small enough that filling in the action cells is feasible. When you want to apply match conditions for the do not care values in a Decision Table and create a match case for each cell, you use the split table operation. Split can be applied to an entire Decision Table or to a single condition row. Additionally, split may be performed on an individual condition cell. Depending on what is selected in the Decision Table, the split operation can create condition cells. Thus, using the split operation you can create rules in a Decision Table. Table 5–3 summarizes the split operation for a selected condition cell, condition row, or for a complete Decision Table. Depending on what is selected in the Decision Table, the compact table or merge cells operations remove condition cells. The compact table operation can be applied to an entire Decision Table. Additionally, the merge operation may be performed on sibling cells or on an entire condition row. Thus, using compact table or merge you can Table 5–3 Summary of Split Operation Operator Description Condition Cell Creates one sibling condition cell for each bucket value represented by the cell. If the condition cell value is do not care, then the cell is split into one sibling cell for each bucket in the bucketset that is not represented by a sibling condition cell, and do not care is no longer represented. Condition Row For each condition cell in the proceeding condition expression, create a sibling group which contains a cell for each value in the bucketset. The effect of this operation is the same as adding a do not care to each sibling group and calling split on each condition cell in each sibling group. Decision Table Same as calling split on each condition row in the Decision Table.