Hello,

I get the following error message when attempting to use a function call on the 
LHS a rule:

    "unable to resolve method using strict-mode: 
java.lang.Object.normalizedLoad2(...)"


My rule and function:

<code>
rule NarrowByParticipantLoad 
    dialect "mvel"
        salience -75
        when
        $nd1 : NurseDetails()   
        $nd2 : NurseDetails()   
        eval(normalizedLoad2( $nd2.hoursPerWeek, $nd2.assignmentCount ) >  
                normalizedLoad2($nd1.hoursPerWeek, $nd1.assignmentCount )) 
        then    
                retract( $nd2 );
end

function double normalizedLoad2( int hoursPerWeek, int assignmentCnt ) {
        if (hoursPerWeek == 0) {
                return 0.0;
        }
        return  (double)assignmentCnt / (double)hoursPerWeek;                   
        
}

</code>

I am using v 4.0.1.   It was my understanding that this should be legal.  Is it 
obvious what I might be ding wrong here?

Thank you, 
Mark
_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to