<br>&nbsp;&nbsp;&nbsp; Brian,<br><br>&nbsp;&nbsp;&nbsp; I&#39;m not aware of any problem with AgendaFilters, so if you think it is indeed a problem, may I ask you please to open a JIRA?<br><br>&nbsp;&nbsp;&nbsp; Having said that, I personally think that AgendaFilters should be used only for test purposes. To implement phased rule firing like the ones you are doing, I strongly recommend you use agenda-groups. You can control the rules that will fire simply by calling setFocus() method on working memory. You can still let rule names to have the prefixes you are using just for documentation purposes, but I discourage you to use them as a control mechanism.
<br>&nbsp;&nbsp;&nbsp; Ruleflow can also be used, but for your use case, I think agenda-groups will be enough.<br><br>&nbsp;&nbsp;&nbsp; []s<br>&nbsp;&nbsp;&nbsp; Edson<br><br><div><span class="gmail_quote">2007/8/22, Brian Enderle &lt;<a href="mailto:brianke@gmail.com">
brianke@gmail.com</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I have many rules in which I have named the various rules by the level at
<br>which the rules are to be fired, for instance:<br><br>rule &quot;LevelOne: Name cannot be null&quot;<br>&nbsp;&nbsp; when<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Person(firstNm == null)<br>&nbsp;&nbsp; then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;log an error&gt;<br>end<br><br>rule &quot;LevelTwo: Street cannot be null&quot;
<br>&nbsp;&nbsp; when<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Person(street== null)<br>&nbsp;&nbsp; then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;log an error&gt;<br>end<br><br>Within my Java code I first insert all objects into a statefulSession, then<br>add all my globals.&nbsp;&nbsp;I then use a switch statement to call different methods
<br>to perform the various levels of validation (ie: performLevelOneValidation(),<br>performLevelTwoValidation(), etc.).&nbsp;&nbsp;Each of these methods calls a common<br>method, performValidation(String validationLevel) which I want to use to fire
<br>the rules of just the validation level supplied.&nbsp;&nbsp;I am doing this with:<br><br>statefulSession.fireAllRules(new RuleNameStartsWithAgendaFilter<br>(validationLevel));<br><br>In some cases I need to perform multiple levels of validation (if anything
<br>over Level One validation is called, all preceding levels also need to be<br>validated) and need to perform them in order for reporting purposes.&nbsp;&nbsp;My code<br>correctly calls my performaValidation() method with the correct
<br>validationLevel but the only rules that fire are those with &quot;LevelOne&quot; in the<br>rule name.<br><br>I know the data, the rules, the globals, etc are all present for firing rules<br>in a level other than level one and that I should get some mathces to my rules
<br>but I am not getting anything to match outside of Level One.<br><br>I can only assume that the rules other than Level One are not firing and that<br>I am missing something within my code that fires the rules for other levels.
<br>Am I misunderstanding how the AgendaFilter works?&nbsp;&nbsp;Should I be using something<br>else like agenda-group to accomplish this segregation of rules?<br><br>Also, my rules and data objects do not change as the rules are run.&nbsp;&nbsp;I simply
<br>display a list of errors found.&nbsp;&nbsp;Would it benefit me to use sequential mode<br>and would this help me in trying to segerate the rules into various levels?<br><br>Thanks in advance,<br>Brian Enderle<br><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">https://lists.jboss.org/mailman/listinfo/rules-users
</a><br></blockquote></div><br><br clear="all"><br>-- <br>&nbsp;&nbsp;Edson Tirelli<br>&nbsp;&nbsp;Software Engineer - JBoss Rules Core Developer<br>&nbsp;&nbsp;Office: +55 11 3529-6000<br>&nbsp;&nbsp;Mobile: +55 11 9287-5646<br>&nbsp;&nbsp;JBoss, a division of Red Hat @ 
<a href="http://www.jboss.com">www.jboss.com</a>