在下面的规则中,我希望每个 clazz1 首先执行 rule1,并且只有满足,才需要执行其他规则(因为 lock-on-active )
但是在rule1执行之后,drools是在执行rule1、rule2、rule3和rule2、rule3,然后又回到rule1。
您能否建议我的配置是否不正确?
rule "rule1"
ruleflow-group "validate_precondition"
when
$clazz1 : Clazz1 ( isPreConditionSatisfied() )
then
drools.setFocus("validate1");
end
rule "rule2"
agenda-group "validate1"
lock-on-active true
when
$clazz1 : Clazz1 ( !isCheck1(type) )
then
System.out.println("inside check1");
end
rule "rule3"
agenda-group "validate1"
lock-on-active true
when
$clazz1 : Clazz1 ( !isCheck2(type) )
then
System.out.println("inside check2");
end