Hi,<br><br>I need help with constructing rules for my scenario. <br><br>I started off by creating enum values in the main java file and comparing them with the rules to get different responses for different enum values. That was easy.<br>
<br>This time, I&#39;m constructing a list of enum values and passing them into the rules engine as well. I would like to configure my rules in such a way that when they look for the different enum values, they should also look in the list to test if the enum value passed into the rules engine is a member of the list or not.  My old rules looked like this:<br>
<br>rule &quot;Testing for Alpha&quot;<br>salience 100<br>when<br>    alpha : AlphaWrapperClass(type == Class.ALPHA)<br>then    <br>    System.out.println(&quot;Found Alpha&quot;); <br>    alpha.isFound(true);<br>end<br><br>
I tweaked the above rule to :<br><br>rule &quot;Testing for Alpha&quot;<br>
salience 100<br>when<br>    $test: AlphaEnumCollectionsWrapperClass(alphaList : alphaList) <br>    alpha : AlphaWrapperClass(type == Class.ALPHA &amp;&amp; $test contains type )<br>then   <br>    System.out.println(&quot;Found Loudspeaker Equipment. Who wants to jam that? Must resist... Jamming sequence in progress... &quot;);<br>
    materiel.setJam(true); <br>end<br><br>But I&#39;m seeing the following error:<br><br>org.drools.rule.InvalidRulePackage: Unable to create Field Extractor for &#39;$test&#39; of &#39;[ClassObjectType classAlphaEnumCollectionsWrapperClass]&#39; in rule &quot;Testing for Alpha&quot;: [Rule name=Testing for Alpha, agendaGroup=MAIN, salience=100, no-loop=false]<br>
<br>I&#39;d greatly appreciate your help.<br><br>Thanks,<br>Armaghan<br><br>