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

Eric Lindahl (JIRA) jira-events at lists.jboss.org
Thu Nov 4 15:24:01 EDT 2010


    [ https://jira.jboss.org/browse/JBRULES-2469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12561461#action_12561461 ] 

Eric Lindahl commented on JBRULES-2469:
---------------------------------------

Is there a workaround?

> 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.2.0.M1
>
>
> 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