-
Bug
-
Resolution: Done
-
Major
-
7.10.0.GA, 7.13.1.GA, 7.13.2.GA
-
False
-
None
-
False
-
Release Notes
-
-
-
-
-
-
CR1
-
+
-
+
-
-
-
-
2023 Week 12-14 (from Mar 20), 2023 Week 15-17 (from Apr 10), 2023 Week 18-20 (from May 1), 2023 Week 21-23 (from May 22), 2023 Week 24-26 (from Jun 12)
When we execute rules like (*1) and Java code like (*2) below, more specifically, if the pattern (*1-1) has a method call in its constraint and a bound variable is passed to the method, an infinite loop between "Rule 1" and "Rule 2" occurs only in executable model.
(*1) Example rules
rule "Rule 1" when $fact1 : Fact1( $id1 : id == 1 ) $fact2 : Fact2( $id2 : id == 2, convertToIdString($id2) == "id2" ) ..... (*1-1) then System.out.println("***** Action of " + drools.getRule().getName()); modify($fact1) { value = $id2 } end rule "Rule 2" when $fact1 : Fact1( $id1 : id == 1, value == 2 ) $fact2 : Fact2( $id2 : id == 2 ) then System.out.println("***** Action of " + drools.getRule().getName()); modify($fact2) { value = $id1 } end
(*2) Java code
KieServices kServices = KieServices.Factory.get(); KieContainer kContainer = kServices.getKieClasspathContainer(); KieSession kSession = kContainer.newKieSession(); Fact1 fact1 = new Fact1(); fact1.setId(1); fact1.setValue(1); kSession.insert(fact1); Fact2 fact2 = new Fact2(); fact2.setId(2); fact1.setValue(2); kSession.insert(fact2); System.out.println("***** start"); kSession.fireAllRules(10); System.out.println("***** end");
- incorporates
-
DROOLS-7372 executable model doesn't resolve bind variable in method call in LHS for property reactivity
- Resolved