[rules-users] Support for dynamic / ad-hoc queries in Drools

Swindells, Thomas TSwindells at nds.com
Wed Jun 27 10:20:39 EDT 2012



> -----Original Message-----
> From: rules-users-bounces at lists.jboss.org [mailto:rules-users-
> bounces at 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 at 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?) 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.

Thomas


**************************************************************************************
This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmaster at 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
**************************************************************************************



More information about the rules-users mailing list