Subscriber($age : age)<br>AgeRange(minAge &lt;= $age, max &gt;= $age, $code : code)<br>Campaign(listOfAgeRangeCodes contains $code)<br><br><div class="gmail_quote">On Sun, Dec 21, 2008 at 12:17 PM, Maxim Veksler <span dir="ltr">&lt;<a href="mailto:maxim.veksler@gmail.com">maxim.veksler@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div dir="ltr">Hello,<br><br><br>The dataModel is as following:<br><br>class AgeRange() {<br>
Integer code;<br>int minAge;<br>int maxAge;<br>}<br><br>Campaign() {<br>List&lt;Integer&gt; listOfAgeRangeCodes;<br>}<br><br>Subscriber() {<br>
int age;<br>}<br><br>AgeRange()&#39;s and Campaign()&#39;s are pre-populated into the WM.<br>Subscriber() is asserted right before fireAllRules is called.<br><br>I need a rule that would allow me to check if Subscriber() is within one of the defined on the Campaign() AgeRange()&#39;s.<br>

<br>What would be the most efficient way to enforce this constraint? <br>The other possibility I see is to store the list of AgeRange()&#39;s in each Campaign() and then use eval() to iterate over the list...<br><br><br>
Advice and ideas are appreciated.<br>
<br><br>Thank you,<br>Maxim.<br>-- <br>Cheers, <br>Maxim Veksler<br><br>&quot;Free as in Freedom&quot; - Do u GNU ?<br>
</div>
<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></div><br>