It seems u have not imported the IsBadDebtor class in your drool file.

If it's inner class of Debtor then use as Debtor.IsBadDebtor.drools compiler unable to find IsBadDebtor 



Thanks,

Bharadwaj nakka.


On Wed, Mar 20, 2013 at 12:14 PM, ajklunder2 <albert.jan.klunder@gmail.com> wrote:
Hi,

In the Drools documentation is "the buss pass" example of how to use
inference.

rule "Infer Adult"
when
  $p : Person( age >= 18 )
then
  insert( new IsAdult( $p ) )
end

However, when I try this myself I get compilation errors on IsAdult and a
missing ";" after the insert statement. (I am using the Drools plugin in
Eclipse)

Here is an example of my own what has the same issue:

//list any import classes here.
import com.example.vdc.VdcLandingPage;
import com.invoicestore.domain.Debtor;

//declare any global variables here
global VdcLandingPage UI;


rule "Infer bad debtor"

when
        $debtor : Debtor( isBadDebtor() == true )
then
        insert( new IsBadDebtor( $debtor ) );
end


BuildError: Unable to Analyse Expression drools.insert( new IsBadDebtor(
$debtor ) );:
[Error: Failed to compileShared: 1 compilation error(s):
 - (1,16) could not resolve class: IsBadDebtor]
[Near : {... drools.insert( new IsBadDebtor( $debtor ) ); ....}]
                            ^
[Line: 23, Column: 0]

I have studied the Drools documentation and cannot find anything what might
lead to a solution. I have tried to set the dialect to "mvel" but that is
not solving the problem.

Any suggestions how to solve this?




--
View this message in context: http://drools.46999.n3.nabble.com/The-buss-pass-example-of-inference-results-in-compilation-errors-how-to-solve-these-tp4022912.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users