[rules-users] Optaplanner ShiftAssignment Employee is null

ns nick.snels at ocmwturnhout.be
Fri Nov 29 05:47:17 EST 2013


Hi,

I have a strange error. When I get my final roster, I do:

System.out.println(final_roster.getShiftAssignmentList());

I get a list of all the employees (with their names) assigned to a certain
shift on a certain date.

Now I would like to iterate over this list to save it to my database, so I
do the following to test:

for (ShiftAssignment shiftAssignment : roster.getShiftAssignmentList())
{
     System.out.println("Shift assignment: " + shiftAssignment.getEmployee()
+ " - " + shiftAssignment.getShiftDate() + " - " +
shiftAssignment.getShift().getLabel());
}

But now the shiftAssignment.getEmployee() returns null. How can this happen?
Thanks



--
View this message in context: http://drools.46999.n3.nabble.com/Optaplanner-ShiftAssignment-Employee-is-null-tp4027010.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list