<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">&lt;<a href="mailto:rich.j.riley@gmail.com" target="_blank">rich.j.riley@gmail.com</a>&gt;</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&#39;d be better to use !=<br>
rather than the &#39;not&#39; keyword (&#39;not&#39; should be read &#39;doesn&#39;t exist&#39; which<br>
doesn&#39;t work if you want to bind a value). So your rule should be something<br>
like:<br>
<div class=""><br>
rule &quot;files not equal&quot;<br>
<br>
  when<br>
</div>        $file : FileData(fileOld != fileNew)<br>
<div class="">    then<br>
       System.out.println(&quot;files are not equal&quot;);<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>