We are attempting to test the defeasible belief system in the Kie Workbench 6.2.0.Final, and would like to be able to use Test Scenerios feature to test defeasible rules. In the following setup we created a Test Scenerio. We were expecting the "CheckforACK" rule to run but not "NotNO" rule. Instead, both rules are running in the test scenerio.
I have modified the kiemodule.xml
<kbase name="defaultKieBase" default="true" packages="abc.qwerty.*">
<ksession name="kiesession" beliefSystem="defeasible"/>
</kbase>
Here are the rules we are testing with:
rule "NotNO" @Defeasible
when
$f : foo( bar!= "NO", ppId==12345)
then
System.out.println("PPSuccess");
end
rule "CheckforAll" @Defeats("NotNO")
when
$f : foo( bar== "ALL", ppId==12345, mpId==101)
then
System.out.println("OverideSuccess");
end
Parameters for TestScenerio: bar == ALL,ppId == 12345,mpId == 101
In my example I would like the "CheckforAll" rule to run, but not the "NotNO". When I run the test both rules are being ran. Any help will be appreciated.