Bhamidi Krishna wrote:
Hi, I am attempting to use a function in a decision table, I am sure
I
have gotten it totally wrong because it gives me the following error -
_org.drools.compiler.DroolsParserException_: Unknown error while
parsing. This is a bug. Please contact the Development team.
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_)
I have attached my decision table, the relevant portion of the table
is pasted. Would appreciate ponters in the right direction.
If often helps to look
at the DRL that is being outputted, that should
help you see what is wrong in the DTable.
Thank you
* * 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
------------------------------------------------------------------------
Suspicious message? There’s an alert for that. Get your Hotmail®
account now.
<
http://windowslive.com/Explore/hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_broa...
------------------------------------------------------------------------
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users