Have you checked the expanded DRL? What does this line look like?<br><br>-W<br><br><div class="gmail_quote">On 12 June 2012 17:06, Sandjaja, Dominik <span dir="ltr">&lt;<a href="mailto:dominik.sandjaja@it-motive.de" target="_blank">dominik.sandjaja@it-motive.de</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>






<div>


<p dir="LTR"><span lang="en-us"><font face="Calibri">I have the following Drools DSL &quot;sentence&quot;:</font></span></p>

<p dir="LTR"><span lang="en-us"><font face="Calibri">    [when]The field {field} in the module {module} contains value {value}=$a : {module} ( {field} != null)</font></span></p>

<p dir="LTR"><span lang="en-us"><font face="Calibri">          String( this.equalsIgnoreCase(&quot;{value}&quot;) ) from $a.{field}</font></span></p>

<p dir="LTR"><span lang="en-us"><font face="Calibri">where the `field` is a `Set` of Strings.</font></span></p>

<p dir="LTR"><span lang="en-us"><font face="Calibri">Now, if I have two of these</font></span><span lang="en-us"> <font face="Calibri">sentences in one rule</font></span><span lang="en-us"><font face="Calibri">, it obviously won&#39;t work as the variable `$a` occurs twice. So I wanted to improve the rule to make the variable, well, variable:</font></span></p>


<p dir="LTR"><span lang="en-us"><font face="Calibri">    [when]The field {field} in the module {module} contains value {value} as {a}={a} : {module} ( {field} != null)</font></span></p>

<p dir="LTR"><span lang="en-us"><font face="Calibri">          String( this.equalsIgnoreCase(&quot;{value}&quot;) ) from {a}.{field}</font></span></p>

<p dir="LTR"><span lang="en-us"><font face="Calibri">This doesn&#39;t work, I can&#39;t use the part `{a}.`, that breaks.</font></span></p>

<p dir="LTR"><span lang="en-us"><font face="Calibri">So, my questions are: Is there either a way to rewrite the rules or a way to allow the `{variable}.` notation to work? Alternatively, is there a `contains` operator which works case insensitive?</font></span><span lang="en-us"></span></p>


<p dir="LTR"><span lang="en-us"><font face="Calibri">Thanks in advance</font></span></p><span class="HOEnZb"><font color="#888888">

<p dir="LTR"><span lang="en-us"><font face="Calibri">Dominik</font></span><span lang="en-us"></span></p>

</font></span></div>
<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>
<br></blockquote></div><br>