<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=windows-1252"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Bhamidi Krishna wrote:
<blockquote cite="mid:BAY144-W481D0161D9C37E4991F7F3C6F30@phx.gbl"
type="cite">
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>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 -<br>
<br>
<u><font color="#000080" size="2">org.drools.compiler.DroolsParserException</font></u><font
color="#ff0000" size="2">: Unknown error while parsing. This is a bug.
Please contact the Development team.<br>
</font>
<p align="left"><font color="#ff0000" size="2">at
org.drools.compiler.DrlParser.compile(</font><u><font color="#000080"
size="2">DrlParser.java:183</font></u><font color="#ff0000" size="2">)</font></p>
<p align="left"><font color="#ff0000" size="2">at
org.drools.compiler.DrlParser.parse(</font><u><font color="#000080"
size="2">DrlParser.java:61</font></u><font color="#ff0000" size="2">)</font></p>
<p align="left"><font color="#ff0000" size="2">at
org.drools.compiler.PackageBuilder.addPackageFromDrl(</font><u><font
color="#000080" size="2">PackageBuilder.java:165</font></u><font
color="#ff0000" size="2">)</font></p>
<p align="left"><font color="#ff0000" size="2">at
com.sample.DecisionTableTest.readDecisionTable(</font><u><font
color="#000080" size="2">DecisionTableTest.java:60</font></u><font
color="#ff0000" size="2">)</font></p>
<font color="#ff0000" size="2">at com.sample.DecisionTableTest.main(</font><u><font
color="#000080" size="2">DecisionTableTest.java:35</font></u><font
color="#ff0000" size="2">)</font><br>
<br>
<font color="#ff0000" size="2"><font color="#000000">I have attached
my decision table, the relevant portion of the table is pasted. Would
appreciate ponters in the right direction.</font></font><br>
</blockquote>
If often helps to look at the DRL that is being outputted, that should
help you see what is wrong in the DTable.<br>
<blockquote cite="mid:BAY144-W481D0161D9C37E4991F7F3C6F30@phx.gbl"
type="cite"> <br>
<font color="#000000">Thank you</font><br>
<br>
<br>
<font color="#ff0000" size="2"><font color="#000000">
<table style="width: 586pt; border-collapse: collapse;" x:str=""
border="0" cellpadding="0" cellspacing="0" width="780">
<colgroup>
<col style="width: 53pt;" width="70"><col style="width: 105pt;"
width="140">
<col style="width: 93pt;" width="124"><col style="width: 69pt;"
width="92">
<col style="width: 37pt;" width="49"><col style="width: 49pt;"
width="65">
<col style="width: 54pt;" width="72"><col style="width: 41pt;"
width="55">
<col style="width: 37pt;" width="49"><col style="width: 48pt;"
width="64">
</colgroup><tbody>
<tr style="height: 12.75pt;" height="17">
<td class="xl28"
style="border: 0.5pt solid windowtext; width: 53pt; height: 12.75pt; background-color: rgb(255, 255, 153);"
height="17" width="70"><strong><font face="Calibri"> </font></strong></td>
<td class="xl25"
style="border-style: solid solid solid none; border-color: windowtext; border-width: 0.5pt 0.5pt 0.5pt medium; width: 105pt; background-color: transparent;"
width="140"><font face="Calibri">450_60_20_30</font></td>
<td class="xl25"
style="border-style: solid solid solid none; border-color: windowtext; border-width: 0.5pt 0.5pt 0.5pt medium; width: 93pt; background-color: transparent;"
width="124"><font face="Calibri">PROFIT</font></td>
<td class="xl25"
style="border-style: solid solid solid none; border-color: windowtext; border-width: 0.5pt 0.5pt 0.5pt medium; width: 69pt; background-color: transparent;"
width="92"><font face="Calibri">PRICE</font></td>
<td class="xl27"
style="border-style: solid solid solid none; border-color: windowtext; border-width: 0.5pt 0.5pt 0.5pt medium; width: 37pt; background-color: transparent;"
x:num="" align="right" width="49"><font face="Calibri">2</font></td>
<td class="xl26"
style="border-style: solid solid solid none; border-color: windowtext; border-width: 0.5pt 0.5pt 0.5pt medium; width: 49pt; background-color: transparent;"
x:str="PRICE" width="65"><font face="Calibri"><span style=""> </span>PRICE<span
style=""> </span></font></td>
<td class="xl25"
style="border-style: solid solid solid none; border-color: windowtext; border-width: 0.5pt 0.5pt 0.5pt medium; width: 54pt; background-color: transparent;"
x:str="'<" width="72"><font face="Calibri"><</font></td>
<td class="xl25"
style="border-style: solid solid solid none; border-color: windowtext; border-width: 0.5pt 0.5pt 0.5pt medium; width: 41pt; background-color: transparent;"
width="55"><font face="Calibri">Relative</font></td>
<td class="xl25"
style="border-style: solid solid solid none; border-color: windowtext; border-width: 0.5pt 0.5pt 0.5pt medium; width: 37pt; background-color: transparent;"
x:num="" align="right" width="49"><font face="Calibri">25</font></td>
<td class="xl25"
style="border-style: solid solid solid none; border-color: windowtext; border-width: 0.5pt 0.5pt 0.5pt medium; width: 48pt; background-color: transparent;"
width="64"><font face="Calibri">equal</font></td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td class="xl28"
style="border-style: none solid solid; border-color: windowtext; border-width: medium 0.5pt 0.5pt; height: 12.75pt; background-color: rgb(255, 255, 153);"
height="17"><strong><font face="Calibri"> </font></strong></td>
<td class="xl25"
style="border-style: none solid solid none; border-color: windowtext; border-width: medium 0.5pt 0.5pt medium; background-color: transparent;"><font
face="Calibri">450_60_20_30</font></td>
<td class="xl25"
style="border-style: none solid solid none; border-color: windowtext; border-width: medium 0.5pt 0.5pt medium; background-color: transparent;"><font
face="Calibri">PROFIT</font></td>
<td class="xl25"
style="border-style: none solid solid none; border-color: windowtext; border-width: medium 0.5pt 0.5pt medium; background-color: transparent;"><font
face="Calibri">STOCK</font></td>
<td class="xl27"
style="border-style: none solid solid none; border-color: windowtext; border-width: medium 0.5pt 0.5pt medium; background-color: transparent;"
x:num="" align="right"><font face="Calibri">2</font></td>
<td class="xl26"
style="border-style: none solid solid none; border-color: windowtext; border-width: medium 0.5pt 0.5pt medium; background-color: transparent;"
x:str="STOCK"><font face="Calibri"><span style=""> </span>STOCK<span
style=""> </span></font></td>
<td class="xl25"
style="border-style: none solid solid none; border-color: windowtext; border-width: medium 0.5pt 0.5pt medium; background-color: transparent;"><font
face="Calibri">B</font></td>
<td class="xl25"
style="border-style: none solid solid none; border-color: windowtext; border-width: medium 0.5pt 0.5pt medium; background-color: transparent;"><font
face="Calibri">Absolute</font></td>
<td class="xl25"
style="border-style: none solid solid none; border-color: windowtext; border-width: medium 0.5pt 0.5pt medium; background-color: transparent;"
x:num="" align="right"><font face="Calibri">5</font></td>
<td class="xl25"
style="border-style: none solid solid none; border-color: windowtext; border-width: medium 0.5pt 0.5pt medium; background-color: transparent;"><font
face="Calibri">equal</font></td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td class="xl28"
style="border-style: none solid solid; border-color: windowtext; border-width: medium 0.5pt 0.5pt; height: 12.75pt; background-color: rgb(255, 255, 153);"
height="17"><strong><font face="Calibri"> </font></strong></td>
<td class="xl25"
style="border-style: none solid solid none; border-color: windowtext; border-width: medium 0.5pt 0.5pt medium; background-color: transparent;"><font
face="Calibri">450_60_20_30</font></td>
<td class="xl25"
style="border-style: none solid solid none; border-color: windowtext; border-width: medium 0.5pt 0.5pt medium; background-color: transparent;"><font
face="Calibri">PROFIT</font></td>
<td class="xl25"
style="border-style: none solid solid none; border-color: windowtext; border-width: medium 0.5pt 0.5pt medium; background-color: transparent;"><font
face="Calibri">CONTRACT</font></td>
<td class="xl27"
style="border-style: none solid solid none; border-color: windowtext; border-width: medium 0.5pt 0.5pt medium; background-color: transparent;"
x:num="" align="right"><font face="Calibri">2</font></td>
<td class="xl26"
style="border-style: none solid solid none; border-color: windowtext; border-width: medium 0.5pt 0.5pt medium; background-color: transparent;"
x:str="CONTRACT"><font face="Calibri"><span style=""> </span>CONTRACT<span
style=""> </span></font></td>
<td class="xl25"
style="border-style: none solid solid none; border-color: windowtext; border-width: medium 0.5pt 0.5pt medium; background-color: transparent;"><font
face="Calibri">B</font></td>
<td class="xl25"
style="border-style: none solid solid none; border-color: windowtext; border-width: medium 0.5pt 0.5pt medium; background-color: transparent;"><font
face="Calibri">Absolute</font></td>
<td class="xl25"
style="border-style: none solid solid none; border-color: windowtext; border-width: medium 0.5pt 0.5pt medium; background-color: transparent;"
x:num="" align="right"><font face="Calibri">10</font></td>
<td class="xl25"
style="border-style: none solid solid none; border-color: windowtext; border-width: medium 0.5pt 0.5pt medium; background-color: transparent;"><font
face="Calibri">equal</font></td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td class="xl28"
style="border-style: none solid solid; border-color: windowtext; border-width: medium 0.5pt 0.5pt; height: 12.75pt; background-color: rgb(255, 255, 153);"
height="17"><strong><font face="Calibri"> </font></strong></td>
<td class="xl25"
style="border-style: none solid solid none; border-color: windowtext; border-width: medium 0.5pt 0.5pt medium; background-color: transparent;"><font
face="Calibri">450_60_20_30</font></td>
<td class="xl25"
style="border-style: none solid solid none; border-color: windowtext; border-width: medium 0.5pt 0.5pt medium; background-color: transparent;"><font
face="Calibri">SERVICE</font></td>
<td class="xl25"
style="border-style: none solid solid none; border-color: windowtext; border-width: medium 0.5pt 0.5pt medium; background-color: transparent;"><font
face="Calibri">FM</font></td>
<td class="xl25"
style="border-style: none solid solid none; border-color: windowtext; border-width: medium 0.5pt 0.5pt medium; background-color: transparent;"
x:num="" align="right"><font face="Calibri">2</font></td>
<td class="xl25"
style="border-style: none solid solid none; border-color: windowtext; border-width: medium 0.5pt 0.5pt medium; background-color: transparent;"><font
face="Calibri">FM</font></td>
<td class="xl25"
style="border-style: none solid solid none; border-color: windowtext; border-width: medium 0.5pt 0.5pt medium; background-color: transparent;"
x:str="'>"><font face="Calibri">></font></td>
<td class="xl25"
style="border-style: none solid solid none; border-color: windowtext; border-width: medium 0.5pt 0.5pt medium; background-color: transparent;"><font
face="Calibri">Absolute</font></td>
<td class="xl25"
style="border-style: none solid solid none; border-color: windowtext; border-width: medium 0.5pt 0.5pt medium; background-color: transparent;"
x:num="" align="right"><font face="Calibri">30</font></td>
<td class="xl25"
style="border-style: none solid solid none; border-color: windowtext; border-width: medium 0.5pt 0.5pt medium; background-color: transparent;"><font
face="Calibri">equal</font></td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td class="xl24"
style="border: medium none rgb(212, 208, 200); height: 12.75pt; background-color: transparent;"
height="17"><br>
</td>
<td class="xl24"
style="border: medium none rgb(212, 208, 200); background-color: transparent;"><br>
</td>
<td class="xl24"
style="border: medium none rgb(212, 208, 200); background-color: transparent;"><br>
</td>
<td class="xl24"
style="border: medium none rgb(212, 208, 200); background-color: transparent;"><br>
</td>
<td class="xl24"
style="border: medium none rgb(212, 208, 200); background-color: transparent;"><br>
</td>
<td class="xl24"
style="border: medium none rgb(212, 208, 200); background-color: transparent;"><br>
</td>
<td class="xl24"
style="border: medium none rgb(212, 208, 200); background-color: transparent;"><br>
</td>
<td class="xl24"
style="border: medium none rgb(212, 208, 200); background-color: transparent;"><br>
</td>
<td class="xl24"
style="border: medium none rgb(212, 208, 200); background-color: transparent;"><br>
</td>
<td class="xl24"
style="border: medium none rgb(212, 208, 200); background-color: transparent;"><br>
</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td class="xl24"
style="border: medium none rgb(212, 208, 200); height: 12.75pt; background-color: transparent;"
height="17"><br>
</td>
<td class="xl24"
style="border: medium none rgb(212, 208, 200); background-color: transparent;"><font
face="Calibri">Functions</font></td>
<td class="xl24"
style="border: medium none rgb(212, 208, 200); background-color: transparent;"
colspan="8">
<p><font face="Calibri">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</font><br>
<br>
<br>
</p>
</td>
</tr>
</tbody>
</table>
</font></font><br>
<hr>Suspicious message? There’s an alert for that. <a
moz-do-not-send="true"
href="http://windowslive.com/Explore/hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_broad2_122008"
target="_new">Get your Hotmail® account now.</a>
<pre wrap="">
<hr size="4" width="90%">
_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a>
</pre>
</blockquote>
<br>
</body>
</html>