[rules-users] Can a rule be assigned both agenda-group andruleflow-group ?

Kris Verlaenen kris.verlaenen at cs.kuleuven.be
Fri Nov 9 06:00:48 EST 2007


Rules can be added to both a ruleflow-group and an agenda-group.  However, 
for a rule to fire in that case, both its agenda-group AND its 
ruleflow-group should be active, otherwise a rule will NOT fire.  So simply 
calling setFocus will not work if your ruleflow is not executing that 
specific ruleset node as well.

You could try to manually activate your ruleflow-group (and deactivate 
afterwards) in combination with setFocus() if you want to fire only one rule 
using:
    workingMemory.getAgenda().activateRuleFlowGroup(name)

Kris

----- Original Message ----- 
From: "LNguyen" <linh.nguyen at cgi.com>
To: <rules-users at lists.jboss.org>
Sent: Thursday, November 08, 2007 10:17 PM
Subject: [rules-users] Can a rule be assigned both agenda-group 
andruleflow-group ?


>
> Hi everybody:
>
> I would like to use Drools to capture validation logics that will be 
> shared
> at UI level and back-end level.  That is, I need to fire a specific rule
> on-demand to validate a field input and fire it again as part of the final
> validation.
>
> To fire a specific rule, I use the agenda-group attribute.  To fire it 
> again
> as part of a larger group, I then try to create a ruleflow.
>
> I found that if I add a ruleflow-group to a rule, it's can no longer be
> fired by setFocus().  Is that normal, or I did something wrong?  I thought
> of creating a ruleflow for each rule, but that sounds like a hack to me,
> Drools probably offer a more elegant solution (I'm only 2 wks into 
> Drools).
>
> What is best way to implement my problem: to fire a rule individually and 
> to
> fire it again as part of a group?
>
> TIA
> Linh
> -- 
> View this message in context: 
> http://www.nabble.com/Can-a-rule-be-assigned-both-agenda-group-and-ruleflow-group---tf4772952.html#a13653679
> Sent from the drools - user mailing list archive at Nabble.com.
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users 




More information about the rules-users mailing list