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. -- With kind regards, Geoffrey De Smet --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email