<div dir="ltr">It seems u have not imported the <span style="font-family:arial,sans-serif;font-size:13px">IsBadDebtor class in your drool file.</span><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div>
<div style><span style="font-family:arial,sans-serif;font-size:13px">If it's inner class of </span><span style="font-family:arial,sans-serif;font-size:13px">Debtor then use as </span><span style="font-family:arial,sans-serif;font-size:13px">Debtor.</span><span style="font-family:arial,sans-serif;font-size:13px">IsBadDebtor.drools compiler unable to find </span><span style="font-family:arial,sans-serif;font-size:13px">IsBadDebtor</span><span style="font-family:arial,sans-serif;font-size:13px"> </span></div>
<div style><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div style><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div style><span style="font-family:arial,sans-serif;font-size:13px"><br>
</span></div><div style><span style="font-family:arial,sans-serif;font-size:13px">Thanks,</span></div><div style><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div style><span style="font-family:arial,sans-serif;font-size:13px">Bharadwaj nakka.</span></div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Mar 20, 2013 at 12:14 PM, ajklunder2 <span dir="ltr"><<a href="mailto:albert.jan.klunder@gmail.com" target="_blank">albert.jan.klunder@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
In the Drools documentation is "the buss pass" example of how to use<br>
inference.<br>
<br>
rule "Infer Adult"<br>
when<br>
$p : Person( age >= 18 )<br>
then<br>
insert( new IsAdult( $p ) )<br>
end<br>
<br>
However, when I try this myself I get compilation errors on IsAdult and a<br>
missing ";" after the insert statement. (I am using the Drools plugin in<br>
Eclipse)<br>
<br>
Here is an example of my own what has the same issue:<br>
<br>
//list any import classes here.<br>
import com.example.vdc.VdcLandingPage;<br>
import com.invoicestore.domain.Debtor;<br>
<br>
//declare any global variables here<br>
global VdcLandingPage UI;<br>
<br>
<br>
rule "Infer bad debtor"<br>
<br>
when<br>
$debtor : Debtor( isBadDebtor() == true )<br>
then<br>
insert( new IsBadDebtor( $debtor ) );<br>
end<br>
<br>
<br>
BuildError: Unable to Analyse Expression drools.insert( new IsBadDebtor(<br>
$debtor ) );:<br>
[Error: Failed to compileShared: 1 compilation error(s):<br>
- (1,16) could not resolve class: IsBadDebtor]<br>
[Near : {... drools.insert( new IsBadDebtor( $debtor ) ); ....}]<br>
^<br>
[Line: 23, Column: 0]<br>
<br>
I have studied the Drools documentation and cannot find anything what might<br>
lead to a solution. I have tried to set the dialect to "mvel" but that is<br>
not solving the problem.<br>
<br>
Any suggestions how to solve this?<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/The-buss-pass-example-of-inference-results-in-compilation-errors-how-to-solve-these-tp4022912.html" target="_blank">http://drools.46999.n3.nabble.com/The-buss-pass-example-of-inference-results-in-compilation-errors-how-to-solve-these-tp4022912.html</a><br>
Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</blockquote></div><br></div>