[jboss-jira] [JBoss JIRA] (DROOLS-327) PHREAK goes into infinite loop, even with 'no-loop' defined.

Duncan Doyle (JIRA) jira-events at lists.jboss.org
Wed Nov 6 19:12:01 EST 2013


Duncan Doyle created DROOLS-327:
-----------------------------------

             Summary: PHREAK goes into infinite loop, even with 'no-loop' defined.
                 Key: DROOLS-327
                 URL: https://issues.jboss.org/browse/DROOLS-327
             Project: Drools
          Issue Type: Bug
      Security Level: Public (Everyone can see)
    Affects Versions: 6.0.0.CR5
         Environment: Mac OS-X 10.9, JBoss Developer Studio 7, Oracle Hotspot 1.7.0_45
            Reporter: Duncan Doyle
            Assignee: Mark Proctor


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
{infinite loop}

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).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list