-
Bug
-
Resolution: Done
-
Major
-
7.10.0.GA, 7.13.2.GA, 7.13.4.GA
-
False
-
-
False
-
-
-
-
-
-
-
-
-
2024 Week 07-09 (from Feb 12), 2024 Week 10-12 (from Mar 4)
When we run the rules (one of those has multiple update(s) for the same fact object) like (*1) and (*2) below, rule "Rule 2a" is fired in non-executable model but rule "Rule 2b" is actually fired in executable model. In both non-executable model and executable model, rule "Rule 2a" should be fired.
(*1) Problematic rules
dialect "mvel"
rule "Rule 1"
when
$account : Account( id == "1" )
$card1 : Card( id == "10" )
$card2 : Card( id == "11" )
then
System.out.println("***** " + drools.getRule().getName() + ": $account=" + $account + ", $card1=" + $card1 + ", $card2=" + $card2);
$account.currentCard = $card1;
update($account); // ..... (*1-1)
$account.newCard = $card2;
update($account); // ..... (*1-2)
end
rule "Rule 2a"
when
$account : Account( newCard != null )
then
System.out.println("***** " + drools.getRule().getName() + ": $account=" + $account + " --> OK");
end
rule "Rule 2b"
when
$account : Account( newCard == null )
then
System.out.println("***** " + drools.getRule().getName() + ": $account=" + $account + " --> NG");
end
(*2) Java code inserting fact objects and calling KieSession#fireAllRules()
Account account = new Account();
account.setId(new String("1"));
kSession.insert(account);
Card card1 = new Card();
card1.setId(new String("10"));
kSession.insert(card1);
Card card2 = new Card();
card2.setId(new String("11"));
kSession.insert(card2);
System.out.println("***** start");
kSession.fireAllRules();
System.out.println("***** end");
- incorporates
-
DROOLS-7493 executable model wrongly rewrites modify in if-block
-
- Resolved
-
-
DROOLS-7497 Consider property reactivity analysis. Only before "modify/update" or whole RHS
-
- Resolved
-