To better adjust to the varied factors in your business processes, you can create a decision table. Decision tables test a series of property values to match conditions, so that your application performs a specific action under conditions that you define.
For example, you can define a condition in your application to approve a loan request, if the credit score of the applicant is greater than 500 and lower than 700. You can then add a condition that if the applicant's credit score is greater than 700, a customer service representative prepares a special offer for the applicant.-
In the header of Dev Studio, click
. -
In the Label field, enter a name that describes the purpose of the table.
-
In the Apply to field, select the class in which you want to create the decision table.
-
Click Create and open.
-
In the Conditions column, click the header cell.
-
In the Select a property window, in the Property field, enter or select a property that you want to use as a condition.
-
In the Label field, enter the name of the property.
-
Select a comparison method:
- To use a simple comparison, in the Use operator list, select the operator.
- To specify a range for the condition property, select the Use range check box, and then define start range and end range.
For example: You can configure a property value to be greater than and lower than certain amounts. -
Click Save.
- Optional:
To consider additional factors in a decision, add more condition properties:
-
In the if row, click the cell under a property, and then enter a value.
If you configure two or more conditions, enter a value for at least one of the conditions. Your application ignores conditions without values.
-
In the Return column, enter a return result.
For example: You can configure a condition that if a credit score is greater than 500 and lower than 700, the return result is to approve the case. -
To allow for more outcomes, create additional decisions:
-
In the otherwise row, in the Return column, select or enter a property that defines an application behavior when no condition in the table returns a true value.
For example: Configure your application to reject a case. - Optional:
To ensure that your application can process the table, check the table for conflicts by clicking Show conflicts on the toolbar.
For example: If two rows are identical, the second row never evaluates to true and is unreachable.Note: A warning icon appears in rows that are unreachable or empty. - Optional:
To increase the possibility of reaching a return value, improve the completeness of the table by clicking Show completeness on the toolbar.
Note: The system automatically adds suggested rows to the decision table, that cover additional cases. -
Click Save.
- About Decision tables
Use a decision table to derive a value that has one of a few possible outcomes, where each outcome can be detected by a test condition. A decision table lists two or more rows, each containing test conditions, optional actions, and a result.
- Viewing rule history
You can view the saved history of a rule to see when it was changed and by whom. You can also compare the current version with a previous version or restore a previous version of a rule for testing purposes, or if the current version is faulty.
- Viewing generated Java code of Access When rules