Consider a staged approach:<br>One rule would find all counties with dealers and insert a (temporary) fact for each, let&#39;s call them GoodCounty( County c ).<br>Another rule would match any GoodCounty and its wealthy Zips, obtained with a from $goodCounty.getCounty().zips.<br>
A third low salience rule would be required to get rid of all GoodCounty temporaries.<br><br>-W<br><br><div class="gmail_quote">2009/10/22 Ken Archer <span dir="ltr">&lt;<a href="mailto:archerovi@hotmail.com">archerovi@hotmail.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">



<div>
There are certain domains where a collection of objects is itself a member of a different collection of objects (e.g. zips in counties in states, persons in cars at intersections).  In these domains, it would be helpful to create LHS conditions on the individual members of the &quot;subcollection&quot;.  An very hypothetical example of a rule that send direct mail to wealthy zip codes in counties with dealers in states where a business is licensed.<br>
<br>WHEN<br>$ServiceableState: State (LicensedInState=True)<br>$CountiesWithDealers: County (DealersInCounty&gt;0) from $ServiceableState.counties<br>$WealthyZips: Zip (AvgIncome&gt;$100,000) from $CountiesWithDealers.zips  //2nd from not allowed<br>
THEN<br>$WealthyZips.SendDirectMail ()<br><br>I know Collect and Accumulate support nested From keywords, but can you nest From keywords themselves to handle collections of collections?  <br><br>Ken Archer<br>Telogical Systems<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>