book
Article ID: KB0090965
calendar_today
Updated On:
Description
Resolution:
Description:
============
When there are two rules with different priorities which take similar Conditions, the higher priority rule gets executed first. If that rule changes one of the Condition fields in its Action area, then the second rule which was supposed to execute will not since the condition was changed by the first rule.
For example, consider the following Decision table taken from the shipped CreditCardApplication:
Condition Area------------------------------------Action Area
Rule# applicant.Name applicant.Age-----------applicant.Status applicant.Age
1 "John Doe" >=15 && <=35------------"Loan Rejected" 35
2 "John Doe" >=20 && <=30------------"VISA Granted" 15
Now if we pass "John Doe" as applicant.Name and 25 as applicant.Age, then both Rule 1 and 2 satisfy the conditions.
If Rule 1 and Rule 2 have Priority 5, then both the rules get executed, though the order in which they get executed is not guaranteed and is completely dependent on the RTC.
If Rule 1 has Priority 5 and Rule 2 has Priority 6, then Rule 1 gets executed first. In Rule 1 Action area applicant.Age is changed to 35. Since applicant.Age value has changed to 35, Rule 2 condition does not satisfy and hence it doesn't get executed.
Environment:
===========
TIBCO BusinessEvents 5.x
All Operating Systems
Symptoms:
========
Rules are not executed as expected.
Cause:
=====
When Rules with same priority get executed, they receive the same Condition values in parallel. But when Rules with different priorities get executed then the Condition values are sent to rules sequentially. If the first Rule that gets executed changes a Condition field then the second and subsequent rules will fail the condition check.
Resolution:
==========
Avoid changing Rule Conditions in Rule Actions. If there is a business requirement to do so, then rename the conflicting field in the action area so that all of the rules get executed in an expected way.
Issue/Introduction
Priorities on Decision Table Rules and their impact on Rule Execution.