[jboss-jira] [JBoss JIRA] Updated: (JBRULES-2469) UnsupportedOperationException (does not support method call isAllowed) when using prop > $x && < $y

Edson Tirelli (JIRA) jira-events at lists.jboss.org
Fri May 28 15:32:12 EDT 2010


     [ https://jira.jboss.org/browse/JBRULES-2469?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Edson Tirelli updated JBRULES-2469:
-----------------------------------

    Fix Version/s: 5.1.0.CR1
                       (was: 5.1.0.M2)


> UnsupportedOperationException (does not support method call isAllowed) when using prop > $x && < $y
> ---------------------------------------------------------------------------------------------------
>
>                 Key: JBRULES-2469
>                 URL: https://jira.jboss.org/browse/JBRULES-2469
>             Project: Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: drools-compiler
>    Affects Versions: 5.1.0.M1
>            Reporter: Geoffrey De Smet
>            Assignee: Edson Tirelli
>            Priority: Minor
>             Fix For: 5.1.0.CR1
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list