Working with Facts and Bucketsets 3-21
To change the order of buckets in a list of values 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.2 How to Define a List of Ranges Global Bucketset
A list of ranges bucketset lets you specify the type and the endpoints for buckets in the bucketset.
For more information, see Section 3.6.6, What You Need to Know About Range
Bucketsets .
To define a list of ranges range global bucketset: 1.
From Rules Designer select the Bucketsets navigation tab. 2.
From the list next to the Create BucketSet... icon, select List of Ranges. 3.
Double-click in the Data Type field. This displays the Edit Bucketset dialog, as shown in
Figure 3–18 .
Figure 3–18 Edit Bucketset: List of Ranges
4. In the Edit Bucketset dialog, enter the bucketset name in the Name field.
5. In the Edit Bucketset dialog, in the Data Type field, from the list, select the
appropriate data type for the bucketset.
In this example, select int. 6.
Click the Add Bucket icon repeatedly to add the number of buckets you need in the bucketset as shown in
Figure 3–19 .
3-22 Oracle Fusion Middleware Users Guide for Oracle Business Rules
Figure 3–19 Edit Bucketset: Adding Required Buckets
In these steps you add three buckets. You start with the default values, as shown in
Figure 3–19 . After changing the default buckets, the buckets have the following
values:
■
greater than 1000
■
between 500 and 1000, inclusive
■
less than 500 Rules Designer added the buckets with the default values of 50 and 0 and a
negative Infinity -Infinity bucket.
7. Starting at the first or top bucket, in the Endpoint field, double-click the default
value and enter the top value bucket endpoint, and press Enter.
In this example, enter 1000 for the first bucket.
8. In the Included Endpoint field, select the checkbox as appropriate to include or
exclude the bucket endpoint. In this example, you can leave this checkbox checked to include the bucket
endpoint.
9. In the Allowed in Actions field select the checkbox as appropriate to include the
bucket in the bucketset allowable values.
For more information on the Allowed in Actions field and the Include Disallowed Buckets in Tests
field, see Section 3.6.7, What You Need to Know
About Bucketset Allowed in Actions Option .
10. Optionally, in the Alias field double-click the default value and enter the desired
bucket alias, and press Enter.
The alias appears in Decision Tables that use this bucketset. Use an alias to give a more meaningful name to the bucket than the default value the range-based
Range value.
Please note that most names and aliases in Oracle Business Rules allow only letters, numbers, embedded single spaces, and the characters , _, , ., -, , and :.
However, bucket aliases allow additional characters, such as [0..1]. If a bucket alias contains such additional characters, then you cannot refer to the bucket by the
alias in the action cells in a Decision Table. In these cases, you can use the bucket name, which is also known as the bucket value.
Working with Facts and Bucketsets 3-23
The Range field is read-only: it clearly identifies the actual range associated with the bucket regardless of the Alias value. For more information, see
Section 3.6.6, What You Need to Know About Range Bucketsets
.
11.
Moving down the list of buckets, for each subsequent bucket, repeat from Step 7. For the second bucket, enter the endpoint value 500.
Figure 3–20 shows the completed bucketset.
Figure 3–20 Edit Bucketset: Completed Range Buckets
12. In the Edit Bucketset dialog, click OK.