-
Bug
-
Resolution: Done
-
Major
-
6.0.0.CR5
-
None
See this project on my Github: https://github.com/DuncanDoyle/DroolsPhreakConditionalNamedConsequenceInfiniteLoopIssue
The 'src/main/resources/rules/Sample.drl' contains an adapted version of the default Drools Eclipse plugin sample rule. As you can see, the rule uses Conditional Named Consequence construct. Although the rule is a bit strange (the issue actuallty popped up while debugging another issue) it does show different behaviour between ReteOO and PHREAK, where in this case PHREAK actually goes into an infinitie-loop, even though 'no-loop' has been defined on the "Hello World" rule.
To run the sample using ReteOO:
- mvn -Preteoo exec:java
The (correct) output is:
Hello World
Goodbye cruel world
To run the sample using PHREAK
- mvn -Pphreak exec:java
The incorrect output is:
Hello, I'm here!
Hello World
Goodbye cruel world
Goodbye cruel world
Goodbye cruel world
Goodbye cruel world
Goodbye cruel world
Note that the PHREAK run also prints "Hello, I'm here!" and ReteOO doesn't (because the activation of that rule is canceled when the Message is updated with a new message and status).