<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Darko IVANCAN wrote:
<blockquote cite="mid:474C3800.6080702@gmx.de" type="cite">
  <pre wrap="">Hmm,

Right.
Size is not a property (getSize), thus (size==2) does not work.

I'm not sure,but  myList(size()==2) could work though.
  </pre>
</blockquote>
you would have to do List() from myList, otherwise it assumes its
reasoning over data asserted into the working memory - hmm I assume
that works, never tried, as I'm not sure its a valid use case - just
assert the object. You can use globals freely in field constraints.
Remember the engine has no idea when globals change, so if they are
used in the LHS they should be considered immutable.<br>
<blockquote cite="mid:474C3800.6080702@gmx.de" type="cite">
  <pre wrap="">
Does it ?

darko


On 27/11/2007 15:09, Michael Zimmermann wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Hi Darko,

  
    </pre>
    <blockquote type="cite">
      <pre wrap="">Global java.util.List myList

rule "SomeOtherRule"
when
    myList(size==2);
then
...
end
    
      </pre>
    </blockquote>
    <pre wrap="">Sorry, won't work. Unable to resolve object type 'diameters'. What works
though is:

rule "abc"
when
 eval (diameters.size() == 2)
then
 ...
end

cu, Michael



_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a>


  
    </pre>
  </blockquote>
  <pre wrap=""><!---->_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a>

  </pre>
</blockquote>
<br>
</body>
</html>