[rules-users] problem with drools

rjr201 rich.j.riley at gmail.com
Fri Feb 28 04:37:58 EST 2014


You need to bind your fact to a variable, so that you can call the getFileOld
method from a non static context. Also, I think you'd be better to use !=
rather than the 'not' keyword ('not' should be read 'doesn't exist' which
doesn't work if you want to bind a value). So your rule should be something
like:

rule "files not equal"

  when
        $file : FileData(fileOld != fileNew)
    then
       System.out.println("files are not equal");
       difference($file.getFileOld(),$file.getFileNew()); 

end



--
View this message in context: http://drools.46999.n3.nabble.com/rules-users-problem-with-drools-tp4028402p4028404.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list