<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> </div>
<div>I have created a Drools Project using the basic “Hello World” example for starters. I’ve created a class called “Item” with 3 attributes – itemPrice (float), ItemNumber (int), and itemDescription (String) with getters/setters. I do a “New-Drools-Guided
Rule” to create a .brl file called “GuidedRule.brl” and get the “drools.package” created automatically. In drools.package, I add “package com.sample;” and “import com.sample.Item;” and save it.</div>
<div> </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"> </font></div>
<div>rule “GuidedRule”</div>
<div>dialect “mvel”</div>
<div>when</div>
<div> item : Item()</div>
<div>then</div>
<div> item.setItemDescription(“New Description”);</div>
<div>end</div>
<div> </div>
<div>When I click “save” I get errors. </div>
<div><font face="Times New Roman"> </font></div>
<div>On the Generated drl (read only), I get two problems -></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) ' item.setItemDescription( "New Description" );'</div>
<div><font face="Times New Roman"> </font></div>
<div>On the brl source view, I get an error at the <attributes> -> BuildError: Unable to resolve ObjectType 'Item'</div>
<div><font face="Times New Roman"> </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. I can get the rule to work if I don’t reference Item (simple “eval(true)” in the LHS, for example)….</div>
<div><font face="Times New Roman"> </font></div>
<div>I am running Drools 5.1.1 on Eclipse 3.5.</div>
<div><font face="Times New Roman"> </font></div>
<div>Am I overlooking something simple here?</div>
<div> </div>
<div><font face="Times New Roman"> </font></div>
<div><font face="Times New Roman"> </font></div>
</span></font>
</body>
</html>