<br><br><div class="gmail_quote">On 27 June 2012 16:20, Swindells, Thomas <span dir="ltr">&lt;<a href="mailto:TSwindells@nds.com" target="_blank">TSwindells@nds.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
&gt; -----Original Message-----<br>
&gt; From: <a href="mailto:rules-users-bounces@lists.jboss.org">rules-users-bounces@lists.jboss.org</a> [mailto:<a href="mailto:rules-users-">rules-users-</a><br>
&gt; <a href="mailto:bounces@lists.jboss.org">bounces@lists.jboss.org</a>] On Behalf Of Wolfgang Laun<br>
&gt; Sent: 27 June 2012 14:47<br>
&gt; To: Rules Users List<br>
&gt; Subject: Re: [rules-users] Support for dynamic / ad-hoc queries in Drools<br>
&gt;<br>
&gt; On 27/06/2012, jpullmann &lt;<a href="mailto:jaroslav.pullmann@fit.fraunhofer.de">jaroslav.pullmann@fit.fraunhofer.de</a>&gt; wrote:<br>
&gt; &gt;  Hello Wolfgang,<br>
&gt; &gt;<br>
&gt; &gt;  the suggested solution is an elegant syntactical shortcut to what I<br>
&gt; &gt; and other Drools users already do. Support for one-shot queries<br>
&gt; &gt; appears  to be a meaningful extension to the WorkingMemory API, and<br>
&gt; &gt; the unavoidable<br>
&gt; &gt;<br>
&gt; &gt;  effort of parsing and temporarily adding the query pattern to the<br>
&gt; &gt; production  memory will become transparent to the user.<br>
&gt;<br>
&gt; There is still to be decided what to do when compilation fails - throw an<br>
&gt; Exception or return null (with a factory method rather than a constructor).<br>
<br>
If there is any chance that null is a valid value to be returned (which I think there is?)</blockquote><div><br>That&#39;s up to the implementor of the class I was outlining. Errors would have to be logged somewhere. <br>
<br> </div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> then it has to be an exception.<br>
Besides which it is nice to know why the compilation failed with a useful error message where possible.<br></blockquote><div><br>This always depends on the application context, so the class might have to cater for that. Hey, I was just drafting. ;-)<br>
 <br>-W<br><br></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Thomas<br>
<br>
<br>
**************************************************************************************<br>
This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the <a href="mailto:postmaster@nds.com">postmaster@nds.com</a> and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary.<br>

<br>
NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00<br>
**************************************************************************************<br>
<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>