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>
_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to