Is there any documentation on how to write these custom evaluators anywhere? I don’t recall seeing them mentioned anywhere before.

 

Thanks,

 

Thomas

 

From: rules-users-bounces@lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Edson Tirelli
Sent: 31 January 2010 16:24
To: Rules Users List
Subject: Re: [rules-users] Weblogic rules to Drools rules.

...
     It seems to me that what you need is just to use some custom evaluators. For instance, you could implement an "inRange" evaluator that takes a range an matches when the given value is included in the range. Example:

MyFact( myValue inRange "428.0-428.9" )

     Behind the scenes, you are still calling a method that is doing the range matching verification (not much different than calling the method in an eval block), but this has several advantages over the use of eval, starting by the simplicity on rules authoring, improved testability and *specially* the ability to improve node sharing among rules. Developing custom evaluators for Drools requires a developer to write a class that contains some boiler plate code, but even someone that never implemented one before should be able to develop and test the operator in less than a day. After it is done, you can simply start using it everywhere.



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.

An NDS Group Limited company. www.nds.com