[rules-users] Optaplanner rules error

SNELS Nick nick.snels at ocmwturnhout.be
Thu Sep 19 03:56:40 EDT 2013


Hi,

I have the following Drools rule in Optaplanner:

rule "oneShiftPerDay"
    when
        $leftAssignment : ShiftAssignment($leftId : id, $employee : employee, $shiftDate : shiftDate, employee != null)
        $rightAssignment : ShiftAssignment(employee == $employee, shiftDate == $shiftDate, id > $leftId)
    then
        scoreHolder.addHardConstraintMatch(kcontext, -1);
end

But when I run the solver I get the following error:

09:02:46.128 [main] ERROR o.d.c.k.b.impl.AbstractKieModule - Unable to build KieBaseModel:defaultKieBase
Error importing : 'be.comp.permanenties.domain.solver.EmployeeAssignmentTotal'
Error importing : 'be.comp.permanenties.domain.solver.EmployeeWorkSequence'
Rule Compilation error : [Rule name='oneShiftPerDay']
            be/comp/permanenties/solver/Rule_oneShiftPerDay544009415.java (2:220) : Only a type can be imported. be.comp.permanenties.domain.solver.EmployeeWorkSequence resolves to a package
            be/comp/permanenties/solver/Rule_oneShiftPerDay544009415.java (2:978) : Only a type can be imported. be.comp.permanenties.domain.solver.EmployeeAssignmentTotal resolves to a package

How can I solve this error? Thanks.

Kind regards,

Nick

[http://www.ocmwturnhout.be] <http://www.ocmwturnhout.be>

Dit bericht is onderworpen aan de bepalingen van onze disclaimer<http://www.ocmwturnhout.be/nl/content/2436>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20130919/b4de0605/attachment.html 


More information about the rules-users mailing list