Details
-
Bug
-
Resolution: Done
-
Minor
-
5.1.0.M1
-
None
Description
I get this exception:
java.lang.UnsupportedOperationException: does not support method call isAllowed(Object object, InternalWorkingMemory workingMemoiry)
with this expression:
shiftDateDayIndex > $firstDayIndex && < ($firstDayIndex + $minimumIndexDiff)
On this rule in nurseRosteringScoreRules.drl:
//rule "minimumConsecutiveWorkingDays"
// when
// $contractLine : ContractLine(
// contractLineType == ContractLineType.CONSECUTIVE_WORKING_DAYS, minimumEnabled == true,
// $contract : contract, $minimumIndexDiff : minimumIndexDiff
// );
// $employee : Employee(contract == $contract);
//
// // The first day has no working day before it
// EmployeeAssignment(
// employee == $employee,
// $firstDayIndex : shiftDateDayIndex
// );
// not EmployeeAssignment(employee == $employee, shiftDateDayIndex == ($firstDayIndex - 1));
//
// // The last day has no working day after it
// EmployeeAssignment(
// employee == $employee,
// shiftDateDayIndex > $firstDayIndex && < ($firstDayIndex + $minimumIndexDiff), // Too few days
// $lastDayIndex : shiftDateDayIndex
// );
// not EmployeeAssignment(employee == $employee, shiftDateDayIndex == ($lastDayIndex + 1));
//
// // There are no free days between the first and last day
// forall($shiftDate : ShiftDate(dayIndex > $firstDayIndex && < $lastDayIndex)
// EmployeeAssignment(employee == $employee, shiftDate == $shiftDate)
// );
// then
// insertLogical(new IntConstraintOccurrence("minimumConsecutiveWorkingDays", ConstraintType.NEGATIVE_SOFT,
// ($firstDayIndex + $minimumIndexDiff - $lastDayIndex) * $contractLine.getMinimumWeight(),
// $employee, $firstDayIndex, $lastDayIndex));
//end
Attachments
Issue Links
- duplicates
-
JBRULES-2224 multi-restriction pattern throws UnsupportedOpEx
- Closed