Support Article
Decision Table does not work correctly
Summary
In a decision table, when a condition is set as != A OR B OR C etc., the returned result is True though the input provided to the decision table is A. This occurs when using the != operator with an OR condition.
Error Messages
Not Applicable
Steps to Reproduce
- Design the decision table with condition as Field1 != Condition1 OR Condition2.
- Provide the input to decision table as Field1 = Condition1. The returned result is True.
Root Cause
This behavior is as per Pega product design.
Resolution
Here’s the explanation for the reported behavior:
The behavior of the decision table logic is as follows:
if(!a || !b)
{
}
it does not behave as below:
if !(a||B)
{
}
Field1 != Condition1 OR Condition2 > (Field1 != Condition1 OR Field1 != Condition2) > returns true always.
Given (Field1 = Condition 1)
The above mentioned condition is a tautology. This is the expected behavior of the decision table rule in the system.
Hence, the condition used by the user is incorrect, since it returns true always based on the truth table.
As a local-change, use the same condition using two columns for the age property based on DeMorgans law.
For example,
!(52 || 53) is equivalent to !52 && !53.
Published April 4, 2019 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.