6.10. Verification and Validation of Guided Decision Tables
In Business Central, the guided decision tables are a way of representing conditional logic (rule) in a precise manner, and they are well suited to business level rules.
Business Central provides verification and validation feature to help ensure that a guided decision table is complete and error free. The feature looks for gaps in the logic of a guided decision table and validates the relationship between different cells. Most of the issues that the Business Central verification and validation feature reports are gaps in the author’s logic. The verification and validation feature does not prevent you from saving your work if you choose to ignore the verification and validation notifications.
When you edit a guided decision table, the verification and validation feature notifies you if you do something wrong. For example, if you forget to set an action for a row of the guided decision table or if you have a duplicate row, a new panel, Analysis, will open in the Business Central with a notification about the issue. The Analysis panel presents a list of issues found in the guided decision table, each item also pointing out the affected guided decision table rows. If you select an item in the list of issues, you will see a more in-depth description of the problem.
The validation and verification feature helps you resolve issues around:
Redundancy happens when two rows in a decision table execute the same consequences for the same set of facts. For example, two rows checking a client’s birthday and providing a birthday discount may result in double discount.
Subsumption is similar to redundancy and exists when two rules execute the same consequences, but one executes on a subset of facts of the other. For example, these two rules:
- when Person age > 10 then Increase Counter
- when Person age > 20 then Increase Counter
In this case, if a person is 15 years old, only one rule fires and if a person is 20 years old, both rules fire. Such cases cause similar trouble during runtime as redundancy.
A conflicting situation occurs when two similar conditions have different consequences. Sometimes, there may be conflicts between two rows (rules) or two cells in a decision table.
The example below illustrates conflict between two rows in a decision table:
- when Deposit > 20000 then Approve Loan
when Deposit > 20000 then Refuse Loan
In this case, there is no way to know if the loan will be approved or not.
The example below illustrates conflict between two cells in a decision table:
- When Age > 25
- When Age < 25
A row with conflicting cells never execute.
Defiency is similar to a conflict and occurs due to incompleteness in the logic of a rule in a decision table. For example, consider the following two deficient rules:
- when Age > 20 then Approve Loan
- when Deposit < 20000 then Refuse Loan
These two rules may lead to confusion for a person who is over 20 years old and have deposited less than 20000. You may add more constraints to avoid the conflict after noticing the warning to make your rule logic complete.
In some cases, usually by accident, the user can delete all the condition or action columns. When the conditions are removed all the actions are executed and when the actions columns are missing the rows do nothing. Both may or may not be by design, usually though this is a mistake.
The verification and validation feature of Business Central reports different issue levels in the Analysis panel while you are updating a guided decision table.
- Error: This means a serious fault, which may lead to the guided decision table failing to work as designed at run time. Conflicts, for example, are reported as errors.
- Warning: This is most likely a serious fault, however they may not prevent the guided decision table from working but need to be double checked. Warnings are used e.g. for subsumption.
- Information: This kind of issues might be a design decision of the author of the guided decision table as well as a simple accident. This is used e.g. for a row missing any condition.
Business Central verification and validation does not prevent you from saving an incorrect change. The feature only reports issues while editing and you can still continue to overlook those and save your changes.
6.10.3. Disabling Verification and Validation of Guided Decision Tables
The decision table verification and validation feature of Business Central is enabled by default. You can disable it by setting the
org.kie.verification.disable-dtable-realtime-verification system property value to
For example, if you are using JBoss EAP as your application server, navigate to
$EAP_HOME directory and run the following command:
Alternatively, set this property in the
<property name="org.kie.verification.disable-dtable-realtime-verification" value="true"/>