On 27 June 2012 16:20, Swindells, Thomas
<TSwindells@nds.com> wrote:
> -----Original Message-----
> From: rules-users-bounces@lists.jboss.org [mailto:rules-users-
> bounces@lists.jboss.org] On Behalf Of Wolfgang Laun
> Sent: 27 June 2012 14:47
> To: Rules Users List
> Subject: Re: [rules-users] Support for dynamic / ad-hoc queries in Drools
>
> On 27/06/2012, jpullmann <jaroslav.pullmann@fit.fraunhofer.de> wrote:
> > Hello Wolfgang,
> >
> > the suggested solution is an elegant syntactical shortcut to what I
> > and other Drools users already do. Support for one-shot queries
> > appears to be a meaningful extension to the WorkingMemory API, and
> > the unavoidable
> >
> > effort of parsing and temporarily adding the query pattern to the
> > production memory will become transparent to the user.
>
> There is still to be decided what to do when compilation fails - throw an
> Exception or return null (with a factory method rather than a constructor).
If there is any chance that null is a valid value to be returned (which I think there is?)
That's up to the implementor of the class I was outlining. Errors would have to be logged somewhere.
then it has to be an exception.
Besides which it is nice to know why the compilation failed with a useful error message where possible.
This always depends on the application context, so the class might have to cater for that. Hey, I was just drafting. ;-)
-W
Thomas
**************************************************************************************
This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmaster@nds.com 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.
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
**************************************************************************************
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users