<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.3132" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=002372906-03102007><FONT face=Arial 
color=#0000ff size=2>If you're using Java dialect, you should be able to use 
eval (for which I think MVEL provides syntax sugar???):-</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=002372906-03102007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><FONT face="Courier New" color=#0000ff size=2>rule "Test"<BR><SPAN 
class=002372906-03102007>&nbsp;&nbsp;&nbsp; </SPAN>when<BR><SPAN 
class=002372906-03102007>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $</SPAN>e : 
Especialista()</FONT></DIV>
<DIV><FONT color=#0000ff><FONT size=2><FONT face="Courier New"><SPAN 
class=002372906-03102007>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
eval($retratoUser.lstCarac.get(0).codCarac != 0 )</SPAN><BR><SPAN 
class=002372906-03102007>&nbsp;&nbsp;&nbsp; </SPAN>then&nbsp;<BR><SPAN 
class=002372906-03102007>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN>System.out.println ("test");<BR>end<BR></FONT></FONT></FONT></DIV>
<DIV dir=ltr align=left><SPAN class=002372906-03102007><FONT face=Arial 
color=#0000ff size=2>or return value expressions (if I'm 
correct):-</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=002372906-03102007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=002372906-03102007>
<DIV><FONT color=#0000ff size=2><FONT face="Courier New">rule "Test"<BR><SPAN 
class=002372906-03102007>&nbsp;&nbsp;&nbsp; </SPAN>when<BR><SPAN 
class=002372906-03102007>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $</SPAN>e : 
Especialista(<SPAN class=002372906-03102007> </FONT><FONT size=2><FONT 
color=#0000ff>($retratoUser.lstCarac.get(0).codCarac != 0 ) 
</SPAN></FONT></FONT></FONT><FONT face="Courier New" color=#0000ff 
size=2>)</FONT></DIV>
<DIV><FONT color=#0000ff><FONT size=2><FONT face="Courier New"><SPAN 
class=002372906-03102007>&nbsp;&nbsp;&nbsp; </SPAN>then&nbsp;<BR><SPAN 
class=002372906-03102007>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN>System.out.println ("test");<BR>end<BR></FONT></FONT></FONT></DIV>
<DIV><FONT><FONT><SPAN class=002372906-03102007><FONT face=Arial color=#0000ff 
size=2>Somebody correct me if I'm completely wrong (I'm trying to refresh myself 
following a stay of absence).</FONT></SPAN></DIV></FONT></FONT></SPAN></DIV><BR>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px">
  <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
  <HR tabIndex=-1>
  <FONT face=Tahoma size=2><B>From:</B> rules-users-bounces@lists.jboss.org 
  [mailto:rules-users-bounces@lists.jboss.org] <B>On Behalf Of </B>Edson 
  Tirelli<BR><B>Sent:</B> 03 October 2007 01:40<BR><B>To:</B> Rules Users 
  List<BR><B>Subject:</B> Re: [rules-users] Using java.util.List in 
  rules<BR></FONT><BR></DIV>
  <DIV></DIV><BR>&nbsp;&nbsp; You can't explicitly call methods in the field 
  name. Use MVEL special notation for lists:<BR><BR>e : 
  Especialista(retratoUser.lstCarac[0].codCarac != 0)<BR><BR>&nbsp;&nbsp;&nbsp; 
  []s<BR>&nbsp;&nbsp;&nbsp; Edson<BR>&nbsp;&nbsp;&nbsp;&nbsp; <BR><BR>
  <DIV><SPAN class=gmail_quote>2007/10/2, Anderson Pazza Mello &lt;<A 
  href="mailto:payakahn@gmail.com">payakahn@gmail.com</A>&gt;:</SPAN>
  <BLOCKQUOTE class=gmail_quote 
  style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">Hi 
    everyone,<BR><BR>I'm trying to use a java.util.List like this:<BR><BR>rule 
    "Test"<BR>&nbsp; <BR>&nbsp;&nbsp;&nbsp; when<BR>&nbsp;&nbsp;&nbsp; 
    &nbsp;&nbsp;&nbsp; e : Especialista(retratoUser.lstCarac.get(0).codCarac != 
    0)<BR>&nbsp;&nbsp;&nbsp; then <BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
    System.out.println ("test");<BR>&nbsp;&nbsp; &nbsp;&nbsp; <BR>end<BR><BR>The 
    property lstCarac is a java.util.List&lt;Caracteristica&gt;. I'm getting 
    this error :<BR><BR>org.drools.rule.InvalidRulePackage: [18,44]: 
    unknown:18:44 Unexpected token '0'[18,46]: unknown:18:46 Unexpected token 
    '.' <BR>&nbsp;&nbsp;&nbsp; at 
    org.drools.rule.Package.checkValidity(Package.java:419)<BR><BR>Someone knows 
    what i have to do to fix the problem??<BR><SPAN class=sg><BR 
    clear=all><BR>-- <BR>Anderson Pazza Mello<BR>Tecnologia em Informática - 
    UFPR 
    </SPAN><BR>_______________________________________________<BR>rules-users 
    mailing list<BR><A onclick="return top.js.OpenExtLink(window,event,this)" 
    href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</A> 
    <BR><A onclick="return top.js.OpenExtLink(window,event,this)" 
    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><BR 
  clear=all><BR>-- <BR>&nbsp;&nbsp;Edson Tirelli<BR>&nbsp;&nbsp;Software 
  Engineer - JBoss Rules Core Developer<BR>&nbsp;&nbsp;Office: +55 11 
  3529-6000<BR>&nbsp;&nbsp;Mobile: +55 11 9287-5646<BR>&nbsp;&nbsp;JBoss, a 
  division of Red Hat @ <A href="http://www.jboss.com">www.jboss.com</A> 
</BLOCKQUOTE></BODY></HTML>