I have 5 rule groups with multiple rules in each rule group.
rule "R1"
dialect "mvel"
ruleflow-group 'RG1'
lock-on-active true
rule "R2"
dialect "mvel"
ruleflow-group 'RG1'
lock-on-active true
rule "R3"
dialect "mvel"
ruleflow-group 'RG1'
lock-on-active true
rule "AR4"
dialect "mvel"
ruleflow-group 'ARG2'
lock-on-active true
rule "AR5"
dialect "mvel"
ruleflow-group 'ARG2'
lock-on-active true
I insert multiple facts of the same type into the kiesession. 20 of them.
I run fireallrules on the session and all the facts get evaluated correctly.
but now there is a new requirement that if R1 fires then we have to skip the rule group RG1 for that one fact and move on to the ARG2 rules.
I tried to add activation-group 'ACTRG1' to all the rules in rule flow group 'RG1' and activation-group 'ACTRG2' to all the rules in rule flow group 'ARG2' and it didn't fire any of the rules.
I am using DROOLS 6.0.0.Final.
Any help is appreciated. If you need more details I will be happy to provide it.
One more thing is that if I insert one fact at a time into the kiesession then I can use drools.getWorkingMemory().clearRuleFlowGroup("{agenda}"); and it works fine.
But if I use multiple facts then it stops processing the rule-flow-group for all the facts in the session.