<div dir="ltr">thank you.. that really helped ..<div>but output appears twice.. what can i do about it?</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Feb 28, 2014 at 3:07 PM, rjr201 <span dir="ltr"><<a href="mailto:rich.j.riley@gmail.com" target="_blank">rich.j.riley@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">You need to bind your fact to a variable, so that you can call the getFileOld<br>
method from a non static context. Also, I think you'd be better to use !=<br>
rather than the 'not' keyword ('not' should be read 'doesn't exist' which<br>
doesn't work if you want to bind a value). So your rule should be something<br>
like:<br>
<div class=""><br>
rule "files not equal"<br>
<br>
when<br>
</div> $file : FileData(fileOld != fileNew)<br>
<div class=""> then<br>
System.out.println("files are not equal");<br>
</div> difference($file.getFileOld(),$file.getFileNew());<br>
<br>
end<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/rules-users-problem-with-drools-tp4028402p4028404.html" target="_blank">http://drools.46999.n3.nabble.com/rules-users-problem-with-drools-tp4028402p4028404.html</a><br>
Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</blockquote></div><br></div>