转载至:https://blog.csdn.net/wo541075754/article/details/75511887
activation-group
该属性将若干个规则划分成一个组,统一命名。在执行的时候,具有相同activation-group 属性的规则中只要有一个被执行,其它的规则都不再执行。可以用类似salience之类属性来实现规则的执行优先级。该属性以前也被称为异或(Xor)组,但技术上并不是这样实现的,当提到此概念,知道是该属性即可。
实例代码:
package com.rules rule "test-activation-group1" activation-group "foo" when then System.out.println("test-activation-group1 被触发"); end rule "test-activation-group2" activation-group "foo" salience 1 when then System.out.println("test-activation-group2 被触发"); end