K thanks, I 'll make a testcase patch for the trunk, like I did for the
other bug that was fixed in 3.0.4 :)
Just to know: Drools does "delta's" for QueryResults too, right?
What I mean, if I change one lesson and say it's modified, drools will
only recalculate the part of the QueryResults which could possibly be
modified.
With kind regards,
Geoffrey De Smet
Mark Proctor wrote:
If a rule fires for the same constraints and you have definitely
asserted your data then I would say this is a bug. Can you make a
self contained test and upload this to JIRA?
Mark
Geoffrey De Smet wrote:
I have a query like this in my drl file:
query "multipleLessonsPerTeacherPerTimeslot"
$lesson : Lesson($id : id, $teacher : teacher,
$timeslot : timeslot);
exists Lesson(id > $id, teacher == $teacher,
timeslot == $timeslot);
end
But when I do this in my java code
workingMemory.fireAllRules();
workingMemory.getQueryResults("multipleLessonsPerTeacherPerTimeslot");
the second line returns null, there are no QueryResults.
Even when I change the query to something simple this:
query "multipleLessonsPerTeacherPerTimeslot"
lesson : Lesson()
end
it still returns null.
But if I try this with a rule, like this:
rule teacherCanOnlyTeachOneGroupAtATime
when
$lesson : Lesson($id : id, $teacher : teacher,
$timeslot : timeslot);
exists Lesson(id > $id, teacher == $teacher,
timeslot == $timeslot);
then
assertLogical(new HardConstraint(1));
end
together with this java code:
workingMemory.fireAllRules();
workingMemory.getObjects(HardConstraint.class);
it does not return null, but a correct list.
Any idea what I am doing wrong? Thanks for any help.
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email