以下のルールでは、各 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