Uploaded image for project: 'JBRULES'
  1. JBRULES
  2. JBRULES-410

More than one Query definition causes an incorrect Rete network to be built.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 3.0.4, 3.1-m1
    • Fix Version/s: 3.0.5, 3.1-m1
    • Component/s: drools-core (expert)
    • Labels:
      None
    • Environment:

      Seen in production, but also is reproducable using a simple JBossRules project. Will post the code and rules as apart of the JIRA

      Description

      When using the queryResults() from the LHS of the rules we are getting a null for the first Fact asserted, and then the query size shows the correct value for the rest of the facts. We observed that this is a problem in the following cases:

      1. LHS Fact does not have any constraints – Event() vs. Event(state == "emit")
      2. Multiple queries in the LHS fail – just returns null results. In order to test this please uncomment query "Total ent1 events" and rule "ENT1 emit with multiple queries"
      3. Multiple queries in the rule file (i.e. two queries defined). One rule uses one query and the other rule uses the other query. The first rule/query will work, but the second rule/query will fail.

        Gliffy Diagrams

          Attachments

          1. querytest.drl
            1 kB
          2. querytest1.drl
            1 kB
          3. QueryTestDriver.java
            5 kB
          4. QueryTestDriver1.java
            5 kB
          5. RuleTest_081006.zip
            14 kB

            Activity

              People

              • Assignee:
                mark.proctor Mark Proctor
                Reporter:
                odigokid Corey M. Ellis
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: