Glad to hear things are moving forward!

   How do you feel about writing a quick tutorial on how to implement a custom evaluator so that others can benefit from your experience? :) We could post it on the blog and add to the manual with the proper credits.

   Regarding your question, "in" is a special parser syntax sugar we have in Drools. So:

field in ("aValue", $aVariable, Some.CONSTANT)

   Is exactly the same as:

field == "aValue" || == $aVariable || == Some.CONSTANT

   So, the answer is, without patching Drools, unfortunately, it is not possible to do the same with custom evaluators. In your case, the best I can suggest without changing Drools parser is to have your evaluator receive all possible values as a single String:

code codeChecker "V100-V200, 243327005, 243327005"

    So, your operator would just split the list and check all values there as appropriate. Obviously, if you would like to submit a patch for Drools allowing custom evaluators to accept multiple values, we would gladly apply the patch to the code base and support it from that time forward.

    Cheers,
       Edson

2010/2/1 kashif10 <kash452@yahoo.com>

Thanks all of you!

We are heading toward  the solution.

i) We start putting interenal data too in WM.
ii) For time period matching I simply write a method in Fact class, which
calls using the exact name matching fucntionality.
iii) For complex code matching including exact number match, Range match,
wildcard match. I created the customEvalutor, usning new operator
codeChecker, to handle all required scenarios,   as follows:

exists (Diagnosis(name == "diag3" || ( code codeChecker "V100-V200" &&
codeSystem == "2.16.840.1.113883.6.96" )  ))


Ques: I need suggestion how to use my custom Evaluator codeChecker in
following suggested OR combination using in. As you know that if we don't
use "in" then we have to add so many ORed patterns.

       exists (Diagnosis(name in ( "Vibrio abc splendidus" , "kash") || ( code in
( "243327005", "243327005") && codeSystem == "2.16.840.1.113883.6.96" )  ) )



-Kash

--
View this message in context: http://n3.nabble.com/Weblogic-rules-to-Drools-rules-tp126265p181432.html
Sent from the Drools - User mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users



--
 Edson Tirelli
 JBoss Drools Core Development
 JBoss by Red Hat @ www.jboss.com