I think I understand your situation, <br>I strongly recommned you to take a look at the docs to see the difference between facts and its attributes and how and when the engine evaluates them.<br>If you really want to use a mechanism to be able to fire different rules in different moments you can use the agenda-groups and the setFocus() method. You can find those topics in the docs as well.<br>
<br>Greetings.<br><br><br><div class="gmail_quote">On Fri, Mar 25, 2011 at 11:35 AM, Benson Fung <span dir="ltr"><<a href="mailto:benson.redhat@gmail.com">benson.redhat@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I see what you mean. You are right, that means when the fact A is<br>
inserted , the rule engine will come up an agenda which is A()<br>
related, right?<br>
<br>
OK, let's take in another way. If A is one of a variable of a Fact<br>
say X(), then only the 3 rules evaluate the A variable of the Fact X()<br>
in the 1000 rules of rulebase. How can I only execute the 3 rules<br>
programmatically?<br>
<br>
In fact, the problem comes from the legacy window program. When we<br>
develop the old window program, we can add lots of field validation of<br>
the field by right clicking the edit box, right? Right now, we need<br>
to migrate to java-based solution and use the BRMS to store those<br>
validation rules. The above 3 rules were put in the validation rules<br>
of the edit field of the window program, and now I put these 3 rules<br>
into the BRMS and revamp the window program frontend to whatever<br>
html/GWT/ZK frontend now.<br>
<br>
If cannot get what I mean, please tell me and I try to describe again.<br>
<br>
<br>
Thank you very much and thanks for your patience.<br>
<font color="#888888"><br>
<br>
Benson<br>
</font><div><div></div><div class="h5"><br>
On Fri, Mar 25, 2011 at 9:39 PM, Mauricio Salatino <<a href="mailto:salaboy@gmail.com">salaboy@gmail.com</a>> wrote:<br>
> so you don't need to worry about them to fire...<br>
> Drools will evaluate only the meaningful rules for the fact A(). There is no<br>
> need for grouping in your situation.<br>
> Are you having a problem with you other rules and that's why are you trying<br>
> to separate them?<br>
> Greetings.<br>
><br>
> On Fri, Mar 25, 2011 at 10:38 AM, Benson Fung <<a href="mailto:benson.redhat@gmail.com">benson.redhat@gmail.com</a>><br>
> wrote:<br>
>><br>
>> The other 997 rules are for another Fact. Sorry for my misleading you.<br>
>><br>
>><br>
>> Benson<br>
>><br>
>> On Fri, Mar 25, 2011 at 9:35 PM, Mauricio Salatino <<a href="mailto:salaboy@gmail.com">salaboy@gmail.com</a>><br>
>> wrote:<br>
>> > but you have another 997 rules about the A() Fact? or the other rules<br>
>> > are<br>
>> > about another facts??<br>
>> > Greetings.<br>
>> ><br>
>> > On Fri, Mar 25, 2011 at 10:29 AM, Benson Fung <<a href="mailto:benson.redhat@gmail.com">benson.redhat@gmail.com</a>><br>
>> > wrote:<br>
>> >><br>
>> >> Thanks Mauricio,<br>
>> >><br>
>> >> What I want is to only execute these 3 rules simultaneously out of<br>
>> >> 1000 rules in the rulebase. Can you advise programmatically how to<br>
>> >> achieve?<br>
>> >><br>
>> >> Thanks<br>
>> >><br>
>> >><br>
>> >> On Fri, Mar 25, 2011 at 9:19 PM, Mauricio Salatino <<a href="mailto:salaboy@gmail.com">salaboy@gmail.com</a>><br>
>> >> wrote:<br>
>> >> > If you include all that rules inside a knowledge session and then if<br>
>> >> > you<br>
>> >> > insert A, all the rules will be evaluated.<br>
>> >> > There is no need to create an agenda group for that, unless I'm<br>
>> >> > missing<br>
>> >> > something else that you don't mention :)<br>
>> >> > Greetings.<br>
>> >> ><br>
>> >> > On Fri, Mar 25, 2011 at 10:10 AM, Benson Fung<br>
>> >> > <<a href="mailto:benson.redhat@gmail.com">benson.redhat@gmail.com</a>><br>
>> >> > wrote:<br>
>> >> >><br>
>> >> >> Hi Leonardo,<br>
>> >> >><br>
>> >> >> Thanks for your patience. Let me try to describe what I want in<br>
>> >> >> details.<br>
>> >> >><br>
>> >> >> e.g. There is a variable A with 3 rules in BRMS.<br>
>> >> >><br>
>> >> >> The variable A is input by a user via an edit box at the frontend.<br>
>> >> >> Now there are 1000 rules in the BRMS rulebase. However, 3 out of<br>
>> >> >> 1000<br>
>> >> >> rules are related to this variable A, like<br>
>> >> >><br>
>> >> >> rule 'check_a_empty'<br>
>> >> >> when (( A == null) || (A == "") )<br>
>> >> >><br>
>> >> >> then return a message 'A cannot be empty'<br>
>> >> >><br>
>> >> >> rule 'A_Range_0_100'<br>
>> >> >> when ((A < 0 ) || (A > 100) )<br>
>> >> >><br>
>> >> >> then return a message 'A must be within the range between 0 and 100'<br>
>> >> >><br>
>> >> >> rule 'check_A_Character'<br>
>> >> >> when ((A is not an integer))<br>
>> >> >><br>
>> >> >> return a message 'A must be an integer'<br>
>> >> >><br>
>> >> >><br>
>> >> >> If I would like to execute the above 3 rules at the same time, how<br>
>> >> >> to<br>
>> >> >> write/develop the AgendaFilter class?<br>
>> >> >><br>
>> >> >> Please advise<br>
>> >> >><br>
>> >> >><br>
>> >> >> Thank you very much<br>
>> >> >> Benson<br>
>> >> >><br>
>> >> >> 2011/3/25 Leonardo Gomes <<a href="mailto:leonardo.f.gomes@gmail.com">leonardo.f.gomes@gmail.com</a>>:<br>
>> >> >> > Hi Benson,<br>
>> >> >> ><br>
>> >> >> > What exactly do you want to achieve? You want to execute rules in<br>
>> >> >> > parallel?<br>
>> >> >> ><br>
>> >> >> ><br>
>> >> >> ><br>
>> >> >> > On Fri, Mar 25, 2011 at 2:08 AM, Benson Fung<br>
>> >> >> > <<a href="mailto:benson.redhat@gmail.com">benson.redhat@gmail.com</a>><br>
>> >> >> > wrote:<br>
>> >> >> >><br>
>> >> >> >> Hi,<br>
>> >> >> >><br>
>> >> >> >> I have setup about 10 rules in the rulebase. Can you tell me how<br>
>> >> >> >> I<br>
>> >> >> >> can execute more than one specific rule at the same time? Please<br>
>> >> >> >> help<br>
>> >> >> >><br>
>> >> >> >><br>
>> >> >> >> Thanks<br>
>> >> >> >> Benson<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>
>> >> >> ><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>
>> >> >> ><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" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
>> >> ><br>
>> >> ><br>
>> >> ><br>
>> >> > --<br>
>> >> > - CTO @ <a href="http://www.plugtree.com" target="_blank">http://www.plugtree.com</a><br>
>> >> > - MyJourney @ <a href="http://salaboy.wordpress.com" target="_blank">http://salaboy.wordpress.com</a><br>
>> >> > - Co-Founder @ <a href="http://www.jbug.com.ar" target="_blank">http://www.jbug.com.ar</a><br>
>> >> ><br>
>> >> > - Salatino "Salaboy" Mauricio -<br>
>> >> ><br>
>> ><br>
>> ><br>
>> ><br>
>> > --<br>
>> > - CTO @ <a href="http://www.plugtree.com" target="_blank">http://www.plugtree.com</a><br>
>> > - MyJourney @ <a href="http://salaboy.wordpress.com" target="_blank">http://salaboy.wordpress.com</a><br>
>> > - Co-Founder @ <a href="http://www.jbug.com.ar" target="_blank">http://www.jbug.com.ar</a><br>
>> ><br>
>> > - Salatino "Salaboy" Mauricio -<br>
>> ><br>
><br>
><br>
><br>
> --<br>
> - CTO @ <a href="http://www.plugtree.com" target="_blank">http://www.plugtree.com</a><br>
> - MyJourney @ <a href="http://salaboy.wordpress.com" target="_blank">http://salaboy.wordpress.com</a><br>
> - Co-Founder @ <a href="http://www.jbug.com.ar" target="_blank">http://www.jbug.com.ar</a><br>
><br>
> - Salatino "Salaboy" Mauricio -<br>
><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br> - CTO @ <a href="http://www.plugtree.com">http://www.plugtree.com</a> <br> - MyJourney @ <a href="http://salaboy.wordpress.com">http://salaboy.wordpress.com</a><br>
- Co-Founder @ <a href="http://www.jbug.com.ar">http://www.jbug.com.ar</a><br> <br> - Salatino "Salaboy" Mauricio -<br>