<div dir="ltr"><div>Hi Wolfgang,</div><div>&gt;How else would the engine know when to reevaluate LHSs?</div><div>Well, the user manual is clear about the LHS of _rules_ being evaluated at assertion time, indeed. However I did not find information about this matter regarding _queries_. Sorry if I missed something, but the manual is mostly concerned about rules and I found less information about queries. (Btw. I&#39;m not using live queries. )</div>
<div>Actually, I have written a small test application following this principle (as described in my original mail, without the explicit update call) and it was working &quot;correctly&quot;, i.e. if I updated a fact outside of the wm then I queried (by the attribute that was updated), the query already matched by the updated attribute. </div>
<div>But I&#39;d like to know whether this behaviour was somehow incidental or whether this is theoretically correct. </div><div>Thank you for your help,</div><div>regards,<br>Andras</div></div><div class="gmail_extra"><br>
<br><div class="gmail_quote">On Fri, Jun 14, 2013 at 9:36 AM, Wolfgang Laun <span dir="ltr">&lt;<a href="mailto:wolfgang.laun@gmail.com" target="_blank">wolfgang.laun@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">
<div class="HOEnZb"><div class="h5">On 14/06/2013, Andras Nagy &lt;<a href="mailto:andras.istvan.nagy@gmail.com">andras.istvan.nagy@gmail.com</a>&gt; wrote:<br>
&gt; Dear All,<br>
&gt; In a multithreaded application I plan to use Drools the following way:<br>
&gt; -use only queries but not rules<br>
&gt; -keep an outside reference to all facts inserted into the working memory,<br>
&gt; and keep modifying the facts after they were inserted<br>
&gt; -use locks synchronizing outside fact changes and Drools query executions<br>
&gt; (happening parallelly on other threads), to make sure that when the queries<br>
&gt; are executed, the facts are always in a consistent state<br>
&gt; Given that the application only uses queries (and no rules), I wonder if<br>
&gt; there is a need to notify the engine of the fact changes (e.g.<br>
&gt; workingMemory.update(...) etc.).<br>
&gt; Could someone confirm that?<br>
<br>
</div></div>How else would the engine know when to reevaluate LHSs?<br>
<br>
-W<br>
<br>
&gt;<br>
&gt; Thank you,<br>
&gt; Andras<br>
&gt;<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>