at org.drools.compiler.DrlParser.compile(
DrlParser.java:183)at org.drools.compiler.DrlParser.parse(
DrlParser.java:61)at org.drools.compiler.PackageBuilder.addPackageFromDrl(
PackageBuilder.java:165)at com.sample.DecisionTableTest.readDecisionTable(
DecisionTableTest.java:60) at com.sample.DecisionTableTest.main(DecisionTableTest.java:35)450_60_20_30 | PROFIT | PRICE | 2 | PRICE | < | Relative | 25 | equal | |
450_60_20_30 | PROFIT | STOCK | 2 | STOCK | B | Absolute | 5 | equal | |
450_60_20_30 | PROFIT | CONTRACT | 2 | CONTRACT | B | Absolute | 10 | equal | |
450_60_20_30 | SERVICE | FM | 2 | FM | > | Absolute | 30 | equal | |
Functions |
function absoluteCompareFunction(int weight,String sign,String value, String compareValue ) double returnValue=0.0; if(value==null || compareValue==null) { return returnValue; } if(value.equalsIgnoreCase(compareValue)) { returnValue= weight; } end |