<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:m="http://schemas.microsoft.com/office/2004/12/omml" 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 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@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:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.hoenzb
        {mso-style-name:hoenzb;}
span.E-MailFormatvorlage19
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>There is no expanded DRL. If I take that line into the DSL, I can’t even validate the DSL and if I have the line in it, I can’t select any DSL statements for rules in Guvnor.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>BTW, I am using Drools and Guvnor 5.4.0.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><b><span lang=DE style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>Von:</span></b><span lang=DE style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> rules-users-bounces@lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] <b>Im Auftrag von </b>Wolfgang Laun<br><b>Gesendet:</b> Dienstag, 12. Juni 2012 17:31<br><b>An:</b> Rules Users List<br><b>Betreff:</b> Re: [rules-users] Using 'from {x}.field' in DSL<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal style='margin-bottom:12.0pt'>Have you checked the expanded DRL? What does this line look like?<br><br>-W<o:p></o:p></p><div><p class=MsoNormal>On 12 June 2012 17:06, Sandjaja, Dominik <<a href="mailto:dominik.sandjaja@it-motive.de" target="_blank">dominik.sandjaja@it-motive.de</a>> wrote:<o:p></o:p></p><div><p><span style='font-family:"Calibri","sans-serif"'>I have the following Drools DSL "sentence":</span><o:p></o:p></p><p><span style='font-family:"Calibri","sans-serif"'> [when]The field {field} in the module {module} contains value {value}=$a : {module} ( {field} != null)</span><o:p></o:p></p><p><span style='font-family:"Calibri","sans-serif"'> String( this.equalsIgnoreCase("{value}") ) from $a.{field}</span><o:p></o:p></p><p><span style='font-family:"Calibri","sans-serif"'>where the `field` is a `Set` of Strings.</span><o:p></o:p></p><p><span style='font-family:"Calibri","sans-serif"'>Now, if I have two of these</span> <span style='font-family:"Calibri","sans-serif"'>sentences in one rule, it obviously won't work as the variable `$a` occurs twice. So I wanted to improve the rule to make the variable, well, variable:</span><o:p></o:p></p><p><span style='font-family:"Calibri","sans-serif"'> [when]The field {field} in the module {module} contains value {value} as {a}={a} : {module} ( {field} != null)</span><o:p></o:p></p><p><span style='font-family:"Calibri","sans-serif"'> String( this.equalsIgnoreCase("{value}") ) from {a}.{field}</span><o:p></o:p></p><p><span style='font-family:"Calibri","sans-serif"'>This doesn't work, I can't use the part `{a}.`, that breaks.</span><o:p></o:p></p><p><span style='font-family:"Calibri","sans-serif"'>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?</span><o:p></o:p></p><p><span style='font-family:"Calibri","sans-serif"'>Thanks in advance</span><o:p></o:p></p><p><span style='font-family:"Calibri","sans-serif";color:#888888'>Dominik</span><span style='color:#888888'><o:p></o:p></span></p></div><p class=MsoNormal style='margin-bottom:12.0pt'><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><o:p></o:p></p></div><p class=MsoNormal><o:p> </o:p></p></div></body></html>