Hi all
I have a problem with functions. Following drl gives this error: "The method
modifyString(String) is undefined for the type Rule_A_Rule_0". But if I remove
the modify( s ) statement it works. Since without the "modify" (in another but
similar drl) I get from the engine a result different from what I expect, I
wonder if it's correct that it gives such error or I have to search the problem
on my side.
Alberto


package test

import java.lang.String;

function void modifyString( String s )
{
        s = "changed";
}

rule "A Rule"
        
        when
                s : String();
                eval( s.compareTo( "foo" ) != 0 );
                
        then 
                modifyString( s );
                modify( s );  # if I comment out this line, no error occurs
                
end


Reply via email to