0
votes

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.

1
Do you have any reliable information how this experimental feature is supposed to work? And it might be better to ask this on the Drools user list. - laune

1 Answers

0
votes

Took advice from laune and reached out to the Drools User Group. The test scenario feature in kieworkbench will always use the kiesession without the belief system in 6.2.0.Final. They are planning to make this kiesession editable for test scenarios in future releases.

Discussion took place here [https://groups.google.com/d/msgid/drools-usage/fd77a506-6357-4639-a154-63111d981907%40googlegroups.com.]