<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="Street"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="address"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="PersonName"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
h1
        {margin-top:12.0pt;
        margin-right:0in;
        margin-bottom:3.0pt;
        margin-left:0in;
        page-break-after:avoid;
        font-size:16.0pt;
        font-family:Arial;}
h2
        {margin-top:12.0pt;
        margin-right:0in;
        margin-bottom:3.0pt;
        margin-left:0in;
        page-break-after:avoid;
        font-size:14.0pt;
        font-family:Arial;
        font-style:italic;}
h3
        {margin-top:12.0pt;
        margin-right:0in;
        margin-bottom:3.0pt;
        margin-left:0in;
        page-break-after:avoid;
        font-size:13.0pt;
        font-family:Arial;}
p.MsoCaption, li.MsoCaption, div.MsoCaption
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Times New Roman";
        font-weight:bold;}
p.MsoTitle, li.MsoTitle, div.MsoTitle
        {margin-top:12.0pt;
        margin-right:0in;
        margin-bottom:3.0pt;
        margin-left:0in;
        text-align:center;
        font-size:16.0pt;
        font-family:Arial;
        font-weight:bold;}
p.MsoBodyText, li.MsoBodyText, div.MsoBodyText
        {margin-top:0in;
        margin-right:0in;
        margin-bottom:6.0pt;
        margin-left:0in;
        text-indent:.5in;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
p.Code, li.Code, div.Code
        {margin-top:0in;
        margin-right:.5in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Courier New";}
p.code0, li.code0, div.code0
        {margin-top:0in;
        margin-right:.5in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Courier New";}
span.EmailStyle22
        {mso-style-type:personal;
        font-family:Arial;
        color:windowtext;}
span.EmailStyle23
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>OK, here's my rules table:<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=528
style='width:395.95pt;border-collapse:collapse'>
<tr height=17 style='height:12.75pt'>
<td width=300 nowrap colspan=2 height=17 valign=bottom bgcolor=black
style='width:225.15pt;border:none;border-bottom:solid black 1.0pt;background:
black;padding:0in 5.4pt 0in 5.4pt;height:12.75pt'>
<p class=MsoNormal><st1:Street w:st="on"><st1:address w:st="on"><b><font
size=1 color=white face=Tahoma><span style='font-size:7.0pt;font-family:
Tahoma;color:white;font-weight:bold'>RuleTable Court</span></font></b></st1:address></st1:Street><b><font
size=1 color=white face=Tahoma><span style='font-size:7.0pt;font-family:Tahoma;
color:white;font-weight:bold'><o:p></o:p></span></font></b></p>
</td>
<td width=228 nowrap height=17 valign=bottom bgcolor=black style='width:170.8pt;
border:none;border-bottom:solid black 1.0pt;background:black;padding:0in 5.4pt 0in 5.4pt;
height:12.75pt'>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'> <o:p></o:p></span></font></p>
</td>
</tr>
<tr height=12 style='height:9.0pt'>
<td width=150 nowrap height=12 valign=bottom bgcolor="#FFCC99"
style='width:112.45pt;border-top:none;border-left:none;border-bottom:solid black 1.0pt;
border-right:solid black 1.0pt;background:#FFCC99;padding:0in 5.4pt 0in 5.4pt;
height:9.0pt'>
<p class=MsoNormal><font size=1 face=Tahoma><span style='font-size:7.0pt;
font-family:Tahoma'>CONDITION<o:p></o:p></span></font></p>
</td>
<td width=150 nowrap height=12 valign=bottom bgcolor="#FFCC99"
style='width:112.7pt;border-top:none;border-left:none;border-bottom:solid black 1.0pt;
border-right:solid black 1.0pt;background:#FFCC99;padding:0in 5.4pt 0in 5.4pt;
height:9.0pt'>
<p class=MsoNormal><font size=1 face=Tahoma><span style='font-size:7.0pt;
font-family:Tahoma'>CONDITION<o:p></o:p></span></font></p>
</td>
<td width=228 nowrap height=12 valign=bottom bgcolor="#FFCC99"
style='width:170.8pt;border-top:none;border-left:none;border-bottom:solid black 1.0pt;
border-right:solid black 1.0pt;background:#FFCC99;padding:0in 5.4pt 0in 5.4pt;
height:9.0pt'>
<p class=MsoNormal><font size=1 face=Tahoma><span style='font-size:7.0pt;
font-family:Tahoma'>ACTION<o:p></o:p></span></font></p>
</td>
</tr>
<tr height=12 style='height:9.0pt'>
<td width=150 nowrap height=12 valign=bottom bgcolor="#FFCC99"
style='width:112.45pt;border-top:none;border-left:none;border-bottom:solid black 1.0pt;
border-right:solid black 1.0pt;background:#FFCC99;padding:0in 5.4pt 0in 5.4pt;
height:9.0pt'>
<p class=MsoNormal><font size=1 face=Tahoma><span style='font-size:7.0pt;
font-family:Tahoma'>singleStatus: SingleParticipantStatus<o:p></o:p></span></font></p>
</td>
<td width=150 nowrap height=12 valign=bottom bgcolor="#FFCC99"
style='width:112.7pt;border-top:none;border-left:none;border-bottom:solid black 1.0pt;
border-right:solid black 1.0pt;background:#FFCC99;padding:0in 5.4pt 0in 5.4pt;
height:9.0pt'>
<p class=MsoNormal><font size=1 face=Tahoma><span style='font-size:7.0pt;
font-family:Tahoma'>singleStatus: SingleParticipantStatus<o:p></o:p></span></font></p>
</td>
<td width=228 nowrap height=12 valign=bottom bgcolor="#FFCC99"
style='width:170.8pt;border-top:none;border-left:none;border-bottom:solid black 1.0pt;
border-right:solid black 1.0pt;background:#FFCC99;padding:0in 5.4pt 0in 5.4pt;
height:9.0pt'>
<p class=MsoNormal><font size=1 face=Tahoma><span style='font-size:7.0pt;
font-family:Tahoma'>singleStatus: SingleParticipantStatus<o:p></o:p></span></font></p>
</td>
</tr>
<tr height=17 style='height:12.75pt'>
<td width=150 height=17 valign=bottom bgcolor="#FFCC99" style='width:112.45pt;
border-top:none;border-left:solid black 1.0pt;border-bottom:none;border-right:
solid black 1.0pt;background:#FFCC99;padding:0in 5.4pt 0in 5.4pt;height:12.75pt'>
<p class=MsoNormal><font size=1 face=Tahoma><span style='font-size:7.0pt;
font-family:Tahoma'>statusType<o:p></o:p></span></font></p>
</td>
<td width=150 height=17 valign=bottom bgcolor="#FFCC99" style='width:112.7pt;
border:none;border-right:solid black 1.0pt;background:#FFCC99;padding:0in 5.4pt 0in 5.4pt;
height:12.75pt'>
<p class=MsoNormal><font size=1 face=Tahoma><span style='font-size:7.0pt;
font-family:Tahoma'>value<o:p></o:p></span></font></p>
</td>
<td width=228 height=17 valign=bottom bgcolor="#FFCC99" style='width:170.8pt;
border:none;border-right:solid black 1.0pt;background:#FFCC99;padding:0in 5.4pt 0in 5.4pt;
height:12.75pt'>
<p class=MsoNormal><font size=1 face=Tahoma><span style='font-size:7.0pt;
font-family:Tahoma'>singleStatus.setAnswer("$param");<o:p></o:p></span></font></p>
</td>
</tr>
</table>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>And this generates a rule that looks like
this, for example:<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Courier New"><span style='font-size:12.0pt;
font-family:"Courier New"'> then singleStatus: SingleParticipantStatus.singleStatus.setAnswer("statusOnly");;<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>This generates an error b/c it doesn't
know how to resolve SingleParticipantStatus.singleStatus.setAnswer, which is
where the error below is coming from.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>So I changed the rule table to simply say:<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=1 face=Tahoma><span style='font-size:7.0pt;
font-family:Tahoma'>setAnswer("$param");<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Which generates:<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'> then</span></font><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> singleStatus:
SingleParticipantStatus.setAnswer("statusOnly");;<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:black'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>Which causes the
non-static method error since setAnswer is an instance method.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:black'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>Can anyone tell
me what I'm doing wrong?<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:black'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>Thanks.</span></font><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>
<hr size=2 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> <st1:PersonName
w:st="on">Hehl, Thomas</st1:PersonName> <br>
<b><span style='font-weight:bold'>Sent:</span></b> Monday, April 30, 2007 8:42
AM<br>
<b><span style='font-weight:bold'>To:</span></b> '<st1:PersonName w:st="on">rules-users@lists.jboss.org</st1:PersonName>'<br>
<b><span style='font-weight:bold'>Subject:</span></b> Newbie: using a
spreadsheet</span></font><o:p></o:p></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>I've been following the ExamplePricePolicy example and
am attempting to build my own rules using a spreadsheet.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>In my spreadsheet rules, I have the following:<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=227
style='width:170.0pt;margin-left:-.65pt;border-collapse:collapse'>
<tr height=12 style='height:9.0pt'>
<td width=227 nowrap height=12 valign=bottom bgcolor="#FFCC99"
style='width:170.0pt;border:solid black 1.0pt;background:#FFCC99;padding:
0in 5.4pt 0in 5.4pt;height:9.0pt'>
<p class=MsoNormal><font size=1 face=Tahoma><span style='font-size:7.0pt;
font-family:Tahoma'>ACTION<o:p></o:p></span></font></p>
</td>
</tr>
<tr height=12 style='height:9.0pt'>
<td width=227 nowrap height=12 valign=bottom bgcolor="#FFCC99"
style='width:170.0pt;border-top:none;border-left:none;border-bottom:solid black 1.0pt;
border-right:solid black 1.0pt;background:#FFCC99;padding:0in 5.4pt 0in 5.4pt;
height:9.0pt'>
<p class=MsoNormal><font size=1 face=Tahoma><span style='font-size:7.0pt;
font-family:Tahoma'>singleStatus: SingleParticipantStatus<o:p></o:p></span></font></p>
</td>
</tr>
<tr height=17 style='height:12.75pt'>
<td width=227 height=17 valign=bottom bgcolor="#FFCC99" style='width:170.0pt;
border-top:none;border-left:solid black 1.0pt;border-bottom:none;border-right:
solid black 1.0pt;background:#FFCC99;padding:0in 5.4pt 0in 5.4pt;height:12.75pt'>
<p class=MsoNormal><font size=1 face=Tahoma><span style='font-size:7.0pt;
font-family:Tahoma'>singleStatus.setAnswer("$param");<o:p></o:p></span></font></p>
</td>
</tr>
</table>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>This throws:<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=red
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:red'>org.drools.rule.InvalidRulePackage: Rule Compilation error
SingleParticipantStatus.singleStatus cannot be resolved</span></font><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=red
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:red'>Rule Compilation error SingleParticipantStatus.singleStatus cannot
be resolved</span></font><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=red
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:red'>Rule Compilation error SingleParticipantStatus.singleStatus cannot
be resolved</span></font><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=red
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:red'>Rule Compilation error SingleParticipantStatus.singleStatus cannot
be resolved</span></font><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=red
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:red'>Rule Compilation error SingleParticipantStatus.singleStatus cannot
be resolved</span></font><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>When I googled on this error, most of the occurrences
appeared to be related to an import issue, but if I change the third line to:<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=1 face=Tahoma><span style='font-size:7.0pt;
font-family:Tahoma'>setAnswer("$param");<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=1 face=Tahoma><span style='font-size:7.0pt;
font-family:Tahoma'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=1 face=Tahoma><span style='font-size:7.0pt;
font-family:Tahoma'>It blows up because it knows that setAnswer is not a static
method, which tends to tell me that it found my class.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=1 face=Tahoma><span style='font-size:7.0pt;
font-family:Tahoma'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=1 face=Tahoma><span style='font-size:7.0pt;
font-family:Tahoma'>I think I've parroted the example exactly and so
I'm confused as to where to go with this issue.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=1 face=Tahoma><span style='font-size:7.0pt;
font-family:Tahoma'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=1 face=Tahoma><span style='font-size:7.0pt;
font-family:Tahoma'>Thanks!<o:p></o:p></span></font></p>
</div>
</body>
</html>