[rules-users] How to use function in decision table

Bhamidi Krishna bhamidik at hotmail.com
Thu Dec 18 13:03:21 EST 2008


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.
 
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. 
http://windowslive.com/Explore/hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_broad2_122008
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20081218/f08a9792/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sample.xls
Type: application/octet-stream
Size: 17920 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/rules-users/attachments/20081218/f08a9792/attachment.obj 


More information about the rules-users mailing list