Uploaded image for project: 'JBRULES'
  1. JBRULES
  2. JBRULES-2469

UnsupportedOperationException (does not support method call isAllowed) when using prop > $x && < $y

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Minor
    • 5.2.0.M1
    • 5.1.0.M1
    • drools-compiler
    • 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

          Activity

            People

              etirelli@redhat.com Edson Tirelli
              gdesmet@redhat.com Geoffrey De Smet (Inactive)
              Archiver:
              rhn-support-ceverson Clark Everson

              Dates

                Created:
                Updated:
                Resolved:
                Archived:

                PagerDuty