Thanks,Is that the solution? That seems odd to me because IsBadDebtor is an inferred object and should have the class Debtor. When you have to declare a class for every type of inferred object you are using that would be strange. These classes would extend the class where they are inferred from and would be totally empty: no own attributes, nor methods. They would only be declared to solve this compilation issue.It seems u have not imported the IsBadDebtor class in your drool fileIf 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 <[hidden email]> wrote:
[hidden email]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
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/rules-users
If you reply to this email, your message will be added to the discussion below:http://drools.46999.n3.nabble.com/The-buss-pass-example-of-inference-results-in-compilation-errors-how-to-solve-these-tp4022912p4022913.htmlTo unsubscribe from The buss pass example of inference results in compilation errors, how to solve these?, click here.
NAML
View this message in context: Re: [rules-users] The buss pass example of inference results in compilation errors, how to solve these?
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users