What You Need to Know About List of Values Bucketsets What You Need to Know About Range Bucketsets

3-26 Oracle Fusion Middleware Users Guide for Oracle Business Rules Figure 3–23 Edit Bucketset Dialog for Java Enum You can control rule ordering in a Decision Table by changing the relative position of the buckets in an enum bucketset associated with a condition expression in a Decision Table. To change the order of buckets in an enumerated type enum bucketset: 1. In the Edit Bucketset dialog for the bucketset, select the bucket you want to reorder.

2. Click the Move Down icon to reorder the bucket down.

3. Click the Move Up icon to reorder the bucket up.

4. Click OK.

3.6.5 What You Need to Know About List of Values Bucketsets

In a Decision Table the order of the buckets in a bucketset associated with a condition expression determines the order of the condition cells, and thus the order of the rules. You can control rule ordering in a Decision Table by changing the relative position of the buckets in a list of values bucketset associated with a condition expression; however, you cannot reorder range buckets. Figure 3–24 shows a bucketset definition in Rules Designer for a bucketset named colors using a list of values. Working with Facts and Bucketsets 3-27 Figure 3–24 Bucketset Definition Using List of Values As shown in Figure 3–24 , by default with a List of Values bucketset there is a value otherwise included with the list of values LOV. This value, otherwise, is distinct from all other values and matches all values of the type that have no other bucket. Thus, with otherwise in the list of values a condition expression that uses the bucketset can handle every value and provides a match for every value of the specified type, where a match is either a defined value or the otherwise bucket. The otherwise value cannot be removed from an LOV bucketset but it can be excluded by clearing the Allowed in Actions checkbox when otherwise is excluded an attempt to assign any value that is not in the list of buckets in the bucketset causes a validation warning. Table 3–3 shows the bucketset values that Rules Designer supports for LOV bucketsets.

3.6.6 What You Need to Know About Range Bucketsets

When you add a bucket to a List of Ranges bucketset, the value is calculated based on the currently selected bucket value and the next highest bucket value. When you change the endpoint value the value is automatically sorted in the bucketset; thus, it does not matter where a bucket is added. However, it is possible for Rules Designer to not have spaces between the current bucketset endpoint value and the endpoint value. In this case, Rules Designer shows a validation warning of the following form: RUL-05849: Bucketset has duplicate bucket value 4999 Table 3–3 Supported Types for LOV Bucketsets Type Description Java primitive types This includes int, double, boolean, char, byte, short, long , and float String Contains String types Calendar Contains Calendar types in the current locale Note: You are not required to specify an LOV bucketset when you use a boolean type in a Decision Table. For boolean types, Oracle Business Rules provides built-in buckets for the possible values true and false. 3-28 Oracle Fusion Middleware Users Guide for Oracle Business Rules To correct this problem you must modify bucket endpoints to remove the duplicate bucket. Figure 3–25 shows the Edit Bucketset window for a bucketset with an integer, int, range. Figure 3–25 Bucketset Definition Using List of Ranges and Three Endpoints Table 3–4 shows the types Rules Designer supports for Range buckets. Note the following conventions for the Range field: ■ Logical operator: specifies a range with respect to positive or negative infinity. For example, =25 means from 25 to positive infinity and 18 means from negative infinity up to but not including 18. ■ Square bracket [: specifies a range that includes this end point value. For example, [18..25 means from 18 up to but not including 25. ■ Round bracket : specifies a range that excludes this end point value. For example, 18..25] means over 18, not including 18, up to and including 25.

3.6.7 What You Need to Know About Bucketset Allowed in Actions Option