<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Calibri" size="2"><span style="font-size:11pt;">
<div>I am experimenting with the Guided Rule Editor in Eclipse, but I am unable to get a Guided Rule to parse.</div>
<div>&nbsp;</div>
<div>I have created a Drools Project using the basic &#8220;Hello World&#8221; example for starters.&nbsp; I&#8217;ve created a class called &#8220;Item&#8221; with 3 attributes &#8211; itemPrice (float), ItemNumber (int), and itemDescription (String) with getters/setters.&nbsp; I do a &#8220;New-Drools-Guided
Rule&#8221; to create a .brl file called &#8220;GuidedRule.brl&#8221; and get the &#8220;drools.package&#8221; created automatically.&nbsp; In drools.package, I add &#8220;package com.sample;&#8221; and &#8220;import com.sample.Item;&#8221; and save it.</div>
<div>&nbsp;</div>
<div>Then I go over to GuidedRule.brl and create a simple rule in the guided editor (this is the DRL view of it):</div>
<div><font face="Times New Roman">&nbsp;</font></div>
<div>rule &#8220;GuidedRule&#8221;</div>
<div>dialect &#8220;mvel&#8221;</div>
<div>when</div>
<div>&nbsp; item : Item()</div>
<div>then</div>
<div>&nbsp; item.setItemDescription(&#8220;New Description&#8221;);</div>
<div>end</div>
<div>&nbsp;</div>
<div>When I click &#8220;save&#8221; I get errors.&nbsp; </div>
<div><font face="Times New Roman">&nbsp;</font></div>
<div>On the Generated drl&nbsp; (read only), I get two problems -&gt;</div>
<div style="text-indent:0.5pt;">BuildError: Unable to build expression for 'consequence': Failed to compile: 2 compilation error(s): </div>
<div style="text-indent:0.5pt;"> - (1,4) unqualified type in strict mode for: item</div>
<div style="text-indent:0.5pt;"> - (1,44) unable to resolve method using strict-mode: java.lang.Object.setItemDescription(java.lang.String) '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; item.setItemDescription( &quot;New Description&quot; );'</div>
<div><font face="Times New Roman">&nbsp;</font></div>
<div>On the brl source view, I get an error at the &lt;attributes&gt; -&gt; BuildError: Unable to resolve ObjectType 'Item'</div>
<div><font face="Times New Roman">&nbsp;</font></div>
<div>It seems to not be able to see my class, which is public, belonging to the same package, and included as an import in drools.package.&nbsp; I can get the rule to work if I don&#8217;t reference Item (simple &#8220;eval(true)&#8221; in the LHS, for example)&#8230;.</div>
<div><font face="Times New Roman">&nbsp;</font></div>
<div>I am running Drools 5.1.1 on Eclipse 3.5.</div>
<div><font face="Times New Roman">&nbsp;</font></div>
<div>Am I overlooking something simple here?</div>
<div>&nbsp;</div>
<div><font face="Times New Roman">&nbsp;</font></div>
<div><font face="Times New Roman">&nbsp;</font></div>
</span></font>
</body>
</html>