<br>   Karthizap,<br><br>   The only thing I could think of for you is to use a function in the DRL to store your &quot;name&quot; value, but any solution where you change your DRL will require you to redeploy the DRL file (obviously).<br>
<br>   Since your &quot;name&quot; changes quite often, can&#39;t you make it a fact of your reasoning process? Just to keep with the &quot;Person&quot; theme, make a helper class called AssignedName or something like that and do:<br>
<br>when<br>    AssignedName( $an : name )<br>    Person( name == $an )<br>then<br>end<br><br>   This will even prevent re-deployments of the DRL itself. Also, a join like the above has cost O(1), so extremely good perf also (better than a function call).<br>
<br>   Drools does not support constants declaration in the DRL file, as you know, but maybe this is something we could add. Do you want to open a JIRA with a feature request for that? (That would still require DRL redeployment discussed above, obviously).<br>
<br>   Edson<br><br>   <br><br><div class="gmail_quote">2009/6/1 karthizap <span dir="ltr">&lt;<a href="mailto:karthizap@gmail.com">karthizap@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Thanks for your reply Earnie. In the following example, don&#39;t want to<br>
hardcode Person Name value like &quot;John&quot; in the DRL file. I want to refer it<br>
from some other sources(If i refer it from java class file, name value is<br>
getting changed quiet often, have to recompile the java source and deploy).<br>
My main requirement is, if the name value is getting changed, don&#39;t want to<br>
redeploy/restart the application. i would like to do the changes in the drl<br>
file only without hard coding.<br>
<br>
<br>
rule &quot;Test Rule&quot;<br>
<br>
        when<br>
                $person : Person( name == &quot;John&quot;)<br>
        then<br>
                $person.setActivation(true)<br>
<br>
end<br>
<br>
Karthikeyan<br>
<br>
Please explain, how i can refer global object in LHS?<br>
<div><div></div><div class="h5"><br>
<br>
Earnie D wrote:<br>
&gt;<br>
&gt; How about adding them as Globals and referencing them that way? You should<br>
&gt; be able to put them in a map as well in a Global and reference them.<br>
&gt;<br>
&gt; Earnie!<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; ________________________________<br>
&gt; From: karthizap &lt;<a href="mailto:karthizap@gmail.com">karthizap@gmail.com</a>&gt;<br>
&gt; To: <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
&gt; Sent: Monday, June 1, 2009 7:14:56 AM<br>
&gt; Subject: re[rules-users] move hardcoded values in DRL or have constants<br>
&gt; inside drl<br>
&gt;<br>
&gt; Is there is anyway i can remove hardcoded values in the DRL file? Can I<br>
&gt; have the constants file(like data dictionary) inside drl/functions.  I<br>
&gt; don&#39;t want to refer java constants class directly in drl file and would<br>
&gt; like to declare and refer those constants inside drl file.<br>
&gt; ________________________________<br>
&gt;  View this message in context: remove hardcoded values in DRL or have<br>
&gt; constants inside drl<br>
&gt; Sent from the drools - user mailing list archive at Nabble.com.<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; rules-users mailing list<br>
<div class="im">&gt; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
</div><div class="im">&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
&gt;<br>
&gt;<br>
<br>
</div>--<br>
View this message in context: <a href="http://www.nabble.com/remove-hardcoded-values-in-DRL-or-have-constants-inside-drl-tp23813412p23814041.html" target="_blank">http://www.nabble.com/remove-hardcoded-values-in-DRL-or-have-constants-inside-drl-tp23813412p23814041.html</a><br>

<div class="im">Sent from the drools - user mailing list archive at Nabble.com.<br>
<br>
</div>_______________________________________________<br>
rules-users mailing list<br>
<div class="im"><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
</div><div><div></div><div class="h5"><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>  Edson Tirelli<br>  JBoss Drools Core Development<br>  JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>