[rules-users] [drools-planner] eval check doesn't provide the expected output

Joshua Daniel joshua.daniel.k at gmail.com
Wed Oct 6 01:09:15 EDT 2010


Hi,

I have the following rule and roomCurriculumCode and currCode are of type
String. If the check is equals "insertLogical" never happens, but if the the
codes are not equal as expressed below the "insertLogical" is performed even
if the strings are equal. What am I missing here

    rule "RoomAndCurriculum"
    when
    $room : Room($roomCode : code, $roomCapacity : capacity,
$roomCurriculumCode : curriculumCode);
    $curriculum : Curriculum($currCode : code);
    eval($roomCurriculumCode != $currCode)
    then
    insertLogical(new IntConstraintOccurrence("RoomAndCurriculum",
ConstraintType.NEGATIVE_HARD, 1, $roomCapacity, $room, $currCode,
$roomCurriculumCode));
    end

-jd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20101006/cfc8afd6/attachment.html 


More information about the rules-users mailing list