You can write<br><br>when<br>
     There is a Customer<br>&gt;  eval(isDiscountAllowed($Customer)) // function call<br>then<br><br>A leading &#39;&gt;&#39; lets you write plain DRL.<br><br>Or, if you want to &quot;hide&quot; it behind some English, you define in DSL<br>
<br>[when][]who may be given a discount=eval(isDiscountAllowed($Customer))<br><br>when<br>

     There is a Customer<br>    who may be given a discount<br>
then<br><br><br>(There is nothing &quot;dynamic&quot; in your function. It&#39;s a DRL function, to be compiled, like a static Java method.)<br><br>-W<br><br><br><div class="gmail_quote">On 11 January 2011 12:48, Bala <span dir="ltr">&lt;<a href="mailto:bala.ganesh@accenture.com">bala.ganesh@accenture.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
Sorry, I missed the explanation......<br>
<br>
The function definition and call should be in dslr.<br>
<br>
Can i define my dslr in the below format?<br>
<br>
sample.dslr<br>
*********<br>
rule &quot;name&quot;<br>
when<br>
   There is a Customer<br>
   eval(isDiscountAllowed($Customer)) // function call<br>
then<br>
  Log : &quot;Message&quot;<br>
end<br>
<br>
// function definition<br>
 function boolean isDiscountAllowed(){<br>
    return true;<br>
}<br>
<br>
<br>
Can i have the drl kindof coding in DSLR?<br>
<br>
Thanks,<br>
Bala<br>
<font color="#888888">--<br>
View this message in context: <a href="http://drools-java-rules-engine.46999.n3.nabble.com/Wrting-drl-code-in-DSLR-tp2233167p2233854.html" target="_blank">http://drools-java-rules-engine.46999.n3.nabble.com/Wrting-drl-code-in-DSLR-tp2233167p2233854.html</a><br>

</font><div><div></div><div class="h5">Sent from the Drools - User mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">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><br>
</div></div></blockquote></div><br>