[jboss-jira] [JBoss JIRA] Commented: (JBRULES-410) Issues when using the queryResults(). Not returning results as expected.
Mark Proctor (JIRA)
jira-events at jboss.com
Wed Aug 23 12:19:50 EDT 2006
[ http://jira.jboss.com/jira/browse/JBRULES-410?page=comments#action_12341700 ]
Mark Proctor commented on JBRULES-410:
--------------------------------------
I have fixed the bug, just writing a unit test for it now. The problem was two fold. Firstly DroolsQuery did not implement equals and hashcode. The other problem was the attachQuery method was not using the attachNode method to add the nodes its generating.
> Issues when using the queryResults(). Not returning results as expected.
> -------------------------------------------------------------------------
>
> Key: JBRULES-410
> URL: http://jira.jboss.com/jira/browse/JBRULES-410
> Project: JBoss Rules
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Reteoo
> Affects Versions: 3.0.3
> Environment: Seen in production, but also is reproducable using a simple JBossRules project. Will post the code and rules as apart of the JIRA
> Reporter: Corey Ellis
> Assigned To: Mark Proctor
> Attachments: querytest.drl, querytest1.drl, QueryTestDriver.java, QueryTestDriver1.java, RuleTest_081006.zip
>
>
> 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.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list