<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
Hello,<br>
<br>
I am using drools 4.0.7 with eclipse 3.3 plugin, and JVM 1.6.0_04-b12<br>
<br>
I am a drools beginner and I first try to implement basics rules. <br>
<br>
I have faced a very strange behaviour I don't understand. Below the use
case &amp; rules :<br>
----------------------------------------<br>
Rules<br>
----------------------------------------<br>
<blockquote>package poc<br>
  <br>
import poc.FlashFact;<br>
  <br>
  <b>rule "always"</b><br>
&nbsp;&nbsp;&nbsp; when<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $f : FlashFact()<br>
&nbsp;&nbsp;&nbsp; then<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; System.out.println("*** always ... "+$f);<br>
end<br>
  <br>
  <b>rule "one (eval)"</b><br>
&nbsp;&nbsp;&nbsp; when<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $f : FlashFact()<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; eval($f.getHomepage().equals("one"))<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp; then<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; System.out.println("*** one (eval) ... "+$f);<br>
end<br>
  <br>
  <b>rule "one (==)"</b><br>
&nbsp;&nbsp;&nbsp; when<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $f : FlashFact(homepage == "one")<br>
&nbsp;&nbsp;&nbsp; then<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; System.out.println("*** one (==) ... "+$f);<br>
end<br>
</blockquote>
----------------------------------------<br>
Use Cases<br>
----------------------------------------<br>
I insert 2 FlashFact instances (one with homepage == "one", another
with "dummy")<br>
<br>
when I lauch the rules (without shadows proxy), the output is :<br>
<br>
*** one (eval) ... poc.FlashFact[one]<br>
*** always ... poc.FlashFact[one]<br>
*** always ... poc.FlashFact[dummy]<br>
<br>
<i><b>=&gt; I don't understand why rule one(==) is not fired ?</b></i><br>
<br>
when I lauch the rules (with shadow proxy), the output is :<br>
<br>
*** one (==) ... poc.FlashFact[one]<br>
*** one (eval) ... poc.FlashFact[one]<br>
*** always ... poc.FlashFact[one]<br>
*** always ... poc.FlashFact[dummy]<br>
<br>
The == and eval does not behave the same way with/without shadow proxy.<br>
<br>
Moreover, I have run the State example provided with Drools in my
workspace and it worked fine (== without shadow proxy).<br>
<br>
Can someone has a deep understanding of this difference of behaviour ?<br>
<br>
Thanks for your reply.<br>
</body>
</html>