<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
p
        {mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
 /* List Definitions */
 @list l0
        {mso-list-id:514270084;
        mso-list-type:hybrid;
        mso-list-template-ids:-1636923808 67698705 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
        {mso-level-text:"%1\)";
        mso-level-tab-stop:.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=blue>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Edson,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Thanks for your replies they have really
helped. <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'><span style='mso-list:Ignore'>1)<font size=1 face="Times New Roman"><span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></font></span></span></font><![endif]><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'>I am still not sure about creating a new operator, since the &#8216;&gt;=&#8217;
operator already exists it just does not cater for strings, which I want to
add. So would creating a new operator cause the existing one to be overrriden
when added to the registry? &nbsp;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'><span style='mso-list:Ignore'>2)<font size=1 face="Times New Roman"><span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></font></span></span></font><![endif]><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'>Having looked at the examples and tests you emailed, I am still unsure
how to actually wire in the changes, say for example I have replaced the
existing &#8216;&gt;=&#8217; evaluator or created a new evaluator so that &#8216;&gt;=&#8217;
&nbsp;now handles strings. When writing rules will the engine pick this up?.. or
do I need to create a new jar by building?.. or do I need to update a
configuration file?... im just not sure&#8230;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'><span style='mso-list:Ignore'>3)<font size=1 face="Times New Roman"><span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></font></span></span></font><![endif]><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'>Wouldn&#8217;t the following also add the evaluator definition by
replacing the existing one.. <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <u>PackageBuilderConfiguration</u>
pkgb = </span></font><b><u><font size=2 color="#7f0055" face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:#7F0055;font-weight:
bold'>new</span></font></u></b><u><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>
PackageBuilderConfiguration()</span></font></u><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></font><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <u>pkgb.getEvaluatorRegistry()</u>.<u>addEvaluatorDefinition</u>(</span></font><b><font
size=2 color="#7f0055" face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New";color:#7F0055;font-weight:bold'>new </span></font></b><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New";color:black;background:silver'>ComparableEvaluatorsDefinition</span></font><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New";color:black'>());</span></font><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <u><span
style='background:silver'>PackageBuilder</span></u> builder = </span></font><b><u><font
size=2 color="#7f0055" face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New";color:#7F0055;font-weight:bold'>new</span></font></u></b><u><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New";color:black'> <span style='background:silver'>PackageBuilder</span>(pkgb)</span></font></u><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New";color:black'>;<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <u>builder.addPackageFromDrl(source)</u>;</span></font><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <u>Package</u>
pkg = <u>builder.getPackage()</u>;</span></font><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></font><font
size=2 color="#3f7f5f" face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New";color:#3F7F5F'>// Add the package to a <u>rulebase</u>
(deploy the rule package).</span></font><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></font><font
size=2 color="#0000c0" face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New";color:#0000C0'>rules</span></font><font size=2
color=black face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'> = <u>RuleBaseFactory.<i><span style='font-style:italic'>newRuleBase</span></i>()</u>;</span></font><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></font><u><font
size=2 color="#0000c0" face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New";color:#0000C0'>rules</span></font></u><u><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New";color:black'>.addPackage(pkg)</span></font></u><font size=2
color=black face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>;</span></font><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Thanks for your help&#8230;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
rules-users-bounces@lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] <b><span style='font-weight:bold'>On
Behalf Of </span></b>Edson Tirelli<br>
<b><span style='font-weight:bold'>Sent:</span></b> 14 July 2009 23:05<br>
<b><span style='font-weight:bold'>To:</span></b> Rules Users List<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [rules-users] Getting
hold of the Evaluator Registry</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'><br>
&nbsp;&nbsp; I am working in one example of drools features where I implement a
custom evaluator here:<br>
<br>
<a
href="http://anonsvn.jboss.org/repos/labs/labs/jbossrules/contrib/lotrc/src/main/java/org/drools/examples/lotrc/evaluators/IsAdjacentToEvaluatorDefinition.java">http://anonsvn.jboss.org/repos/labs/labs/jbossrules/contrib/lotrc/src/main/java/org/drools/examples/lotrc/evaluators/IsAdjacentToEvaluatorDefinition.java</a><br>
<br>
&nbsp;&nbsp; I use the configuration file instead of API in the example:<br>
<br>
<a
href="http://anonsvn.jboss.org/repos/labs/labs/jbossrules/contrib/lotrc/src/main/resources/META-INF/drools.packagebuilder.conf">http://anonsvn.jboss.org/repos/labs/labs/jbossrules/contrib/lotrc/src/main/resources/META-INF/drools.packagebuilder.conf</a><br>
<br>
&nbsp;&nbsp; []s<br>
&nbsp;&nbsp; Edson<o:p></o:p></span></font></p>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>2009/7/14 Edson Tirelli &lt;<a href="mailto:tirelli@post.com">tirelli@post.com</a>&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'><br>
&nbsp;&nbsp; Asif,<br>
<br>
&nbsp;&nbsp; My recommendation is create a new operator for you instead of
overriding existing ones. Although if you really want to replace the existing
ones, setting the property or calling the API to register a new operator will
override the default.<br>
<br>
&nbsp;&nbsp; See:<br>
<br>
<a
href="http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/builder/KnowledgeBuilderConfigurationTest.java"
target="_blank">http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/builder/KnowledgeBuilderConfigurationTest.java</a><br>
<br>
&nbsp;&nbsp; Test method:<br>
<br>
testEvaluatorConfiguration()<br>
<br>
&nbsp;&nbsp; []s<br>
&nbsp;&nbsp; Edson<o:p></o:p></span></font></p>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>2009/7/14 Asif Iqbal &lt;<a href="mailto:Asif.Iqbal@infor.com"
target="_blank">Asif.Iqbal@infor.com</a>&gt;<o:p></o:p></span></font></p>

<div>

<div>

<div link=blue vlink=purple>

<div>

<p><font size=3 face="Times New Roman"><span lang=EN-GB style='font-size:12.0pt'>Hi,</span><o:p></o:p></font></p>

<p><font size=3 face="Times New Roman"><span lang=EN-GB style='font-size:12.0pt'>&nbsp;</span><o:p></o:p></font></p>

<p><font size=3 face="Times New Roman"><span lang=EN-GB style='font-size:12.0pt'>What
I need to do is modify one of the evaluator classes specifically
&#8216;&lt;=&#8217;, so that it can handle strings. Now I know I need to create
a class similar to ComparableEvaluatorDefinition. But what I want to do is
replace the existing one in the evaluator registry with my implementation which
will include the additional String capability.</span><o:p></o:p></font></p>

<p><font size=3 face="Times New Roman"><span lang=EN-GB style='font-size:12.0pt'>&nbsp;</span><o:p></o:p></font></p>

<p><font size=3 face="Times New Roman"><span lang=EN-GB style='font-size:12.0pt'>From
my understanding that should be all that is required. Unless im missing
something&#8230; now all I need to know is how do I get hold of the evaluator
registry?</span><o:p></o:p></font></p>

<p><font size=3 face="Times New Roman"><span lang=EN-GB style='font-size:12.0pt'>&nbsp;</span><o:p></o:p></font></p>

<p><font size=3 face="Times New Roman"><span lang=EN-GB style='font-size:12.0pt'>Cheers</span><o:p></o:p></font></p>

<p><font size=3 face="Times New Roman"><span lang=EN-GB style='font-size:12.0pt'>&nbsp;</span><o:p></o:p></font></p>

<p><font size=3 face="Times New Roman"><span lang=EN-GB style='font-size:12.0pt'>I</span><o:p></o:p></font></p>

</div>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

</div>

</div>

<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">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><o:p></o:p></span></font></p>

</div>

<p class=MsoNormal><font size=3 color="#888888" face="Times New Roman"><span
style='font-size:12.0pt;color:#888888'><br>
<br clear=all>
<br>
-- <br>
&nbsp;Edson Tirelli<br>
&nbsp;JBoss Drools Core Development<br>
&nbsp;JBoss by Red Hat @ <a href="http://www.jboss.com" target="_blank">www.jboss.com</a></span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><br>
<br clear=all>
<br>
-- <br>
&nbsp;Edson Tirelli<br>
&nbsp;JBoss Drools Core Development<br>
&nbsp;JBoss by Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><o:p></o:p></span></font></p>

</div>

</body>

</html>