What You Need to Know About Bucketset Allowed in Actions Option

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

When you define buckets in a bucketset you might define some buckets corresponding to non-permissible values. For example, in a bucketset for driver ages you would typically not allow a bucket that contains values less than 0. Thus, when a fact with driver data includes an age property associated with a driver ages bucketset, then you should not be able to create or modify a fact that has the age property set to a value such as -1. In a bucketset you select Allowed in Actions for valid buckets and deselect this option for invalid buckets. The bucketset option Include Disallowed Buckets in Tests allows you to include all the buckets, whether Allowed in Actions is selected or not, in Decision Table Table 3–4 Supported Types for Range Buckets Type Description Selected primitive types This includes: int, double, short, long, and float Calendar Contains Calendar types in the current locale Working with Facts and Bucketsets 3-29 conditions and in rule tests. By including all buckets you can explicitly test for illegal values. Using the option Include Disallowed Buckets in Tests you can handle two possible cases: 1. The input data for the Oracle Business Rules Engine is clean and does not contain invalid data such as a negative age. In this case, you should deselect the Include Disallowed Buckets in Tests . Note: the reason you do not want to make age 0 an Allowed in Actions is this provides design time validation warnings if you try to create an action that uses an invalid value, such as the following: modifydriver, age: -1 . For more information, see Section 4.11, Using Bucketsets as Constraints for Options Values in Rules . 2. You want to consider excluded buckets in rule tests and in Decision Tables. In this case, you should select Include Disallowed Buckets in Tests. This is useful when the input data for the Oracle Business Rules Engine may not be clean and may contain invalid data for example an invalid negative age. A Decision Table that provides actions for all bucketsets could include cases for excluded buckets and provide an appropriate action, such as asserting an error fact. To handle this you could either select the Allowed in Actions field for every bucket in the bucketset, or, leave the Allowed in Actions field configured as is and select the Include Disallowed Buckets in Tests field. Using the Include Disallowed Buckets in Tests field is not only convenient, you do not need to reconfigure every bucket, it also preserves the configuration of Allowed in Actions so that you can easily reuse this bucketset to handle the first case when you deselect Include Disallowed Buckets in Tests .

3.6.8 What You Need to Know About Bucket Values