Can you show me Debtor class ?
On Wed, Mar 20, 2013 at 12:56 PM, ajklunder2 <albert.jan.klun...@gmail.com>wrote: > 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 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 <[hidden >> email]<http://user/SendEmail.jtp?type=node&node=4022913&i=0> >> > 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 >>> [hidden email] <http://user/SendEmail.jtp?type=node&node=4022913&i=1> >>> https://lists.jboss.org/mailman/listinfo/rules-users >>> >> >> >> _______________________________________________ >> rules-users mailing list >> [hidden email] <http://user/SendEmail.jtp?type=node&node=4022913&i=2> >> 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.html >> To unsubscribe from The buss pass example of inference results in >> compilation errors, how to solve these?, click here. >> NAML<http://drools.46999.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> >> > > > ------------------------------ > View this message in context: Re: [rules-users] The buss pass example of > inference results in compilation errors, how to solve > these?<http://drools.46999.n3.nabble.com/The-buss-pass-example-of-inference-results-in-compilation-errors-how-to-solve-these-tp4022912p4022915.html> > > Sent from the Drools: User forum mailing list > archive<http://drools.46999.n3.nabble.com/Drools-User-forum-f47000.html>at > Nabble.com. > > _______________________________________________ > rules-users mailing list > rules-users@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users >
_______________________________________________ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users