<p>You can avoid the eval setting the size restriction inside the list:</p>
<p>List(size == $certifications.size) from collect...</p>
<p>Best,</p>
<p><blockquote type="cite">El sep 19, 2010 12:29 p.m., "Wolfgang Laun" <<a href="mailto:wolfgang.laun@gmail.com">wolfgang.laun@gmail.com</a>> escribió:<br><br>The idea of the rule given below is to collect a List<AcquiredCertification> from a certain User that's contained in the Position object's list of requiredCertifications, and then to compare the sizes. Equality means that User meets all requirements.<br>
<br>rule "meets requirements"<br>dialect "mvel"<br>when<br> Position( $certifications: requiredCertifications )<br> User( $name: name, $profile: profile )<br> $got: List() from collect ( AcquiredCertification( certification memberOf $certifications ) from $profile.userCertifications )<br>
eval($certifications.size == $got.size )<br>then<br> System.out.println( "Hire " + $name );<br>end<br><font color="#888888"><br>-W</font><p><font color="#500050"><br><br>On 19 September 2010 01:26, lnguyen <<a href="mailto:mzspdrcr@gmail.com">mzspdrcr@gmail.com</a>> wrote:<br>
><br>><br>> Hi,<br>><br>> I'm trying to determ...</font></p><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></p>