Thanks Stephen,<div><br></div><div>This was very helpful!</div><div><br></div><div>Albert Jan<br><br><div class="gmail_quote">2013/3/20 Stephen Masters [via Drools] <span dir="ltr">&lt;<a href="/user/SendEmail.jtp?type=node&node=4022924&i=0" target="_top" rel="nofollow" link="external">[hidden email]</a>&gt;</span><br>
<blockquote style='border-left:2px solid #CCCCCC;padding:0 1em' class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

        <div>There seem to be a couple of misunderstandings of what in inferred type is.</div><div><br></div><div>Firstly, it&#39;s a fact type just like any other fact. You are inserting it into working memory in your rule. Therefore you need to declare it. I tend to use declared types for inferred facts. i.e.:</div>
<div><br></div><div>declare IsBadDebtor</div><div><span style="white-space:pre-wrap">        </span>debtor: com.invoicestore.domain.Debtor</div><div>end</div><div><br></div><div>Secondly, it does not need to extend anything. Obviously, you could create an IsBadDebtor class, which extends the Debtor class, but that&#39;s not required. Note in the above example that debtor is a property of the IsBadDebtor declared type.</div>
<div><br></div><div>Steve</div><div><br></div><div><br></div><br><div><div>On 20 Mar 2013, at 07:39, Bharadwaj N &lt;<a href="http://user/SendEmail.jtp?type=node&amp;node=4022923&amp;i=0" rel="nofollow" link="external" target="_blank">[hidden email]</a>&gt; wrote:</div>
<br><blockquote style='border-left:2px solid #CCCCCC;padding:0 1em' style="border-left:2px solid #cccccc;padding:0 1em" type="cite"><div dir="ltr">Can you show me <span style="font-family:arial,sans-serif;font-size:13px">Debtor class ?</span></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Wed, Mar 20, 2013 at 12:56 PM, ajklunder2 <span dir="ltr">&lt;<a href="http://user/SendEmail.jtp?type=node&amp;node=4022923&amp;i=1" rel="nofollow" link="external" target="_blank">[hidden email]</a>&gt;</span> wrote:<br>

<blockquote style='border-left:2px solid #CCCCCC;padding:0 1em' style="border-left:2px solid #cccccc;padding:0 1em" class="gmail_quote">Thanks,<div><br></div><div>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.</div>


<div><br></div><div><br></div><div><div class="gmail_quote"><div><blockquote style='border-left:2px solid #CCCCCC;padding:0 1em' style="border-left:2px solid #cccccc;padding:0 1em" class="gmail_quote"><div dir="ltr"><div><span style="font-size:13px;font-family:arial,sans-serif">It seems u have not imported the </span><span style="font-size:13px;font-family:arial,sans-serif">IsBadDebtor class in your drool file</span></div>


</div></blockquote><div> </div></div><blockquote style='border-left:2px solid #CCCCCC;padding:0 1em' style="border-left:2px solid #cccccc;padding:0 1em" class="gmail_quote"><div dir="ltr">

<div><span style="font-family:arial,sans-serif;font-size:13px">If it&#39;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><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br>




</span></div><div><span style="font-family:arial,sans-serif;font-size:13px">Thanks,</span></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><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"><div><div>On Wed, Mar 20, 2013 at 12:14 PM, ajklunder2 <span dir="ltr">&lt;<a href="http://user/SendEmail.jtp?type=node&amp;node=4022913&amp;i=0" rel="nofollow" link="external" target="_blank">[hidden email]</a>&gt;</span> wrote:<br>




</div></div><blockquote style='border-left:2px solid #CCCCCC;padding:0 1em' style="border-left:2px solid #cccccc;padding:0 1em" class="gmail_quote"><div><div>Hi,<br>
<br>
In the Drools documentation is &quot;the buss pass&quot; example of how to use<br>
inference.<br>
<br>
rule &quot;Infer Adult&quot;<br>
when<br>
  $p : Person( age &gt;= 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 &quot;;&quot; 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 &quot;Infer bad debtor&quot;<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 &quot;mvel&quot; 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" rel="nofollow" link="external" 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 <a href="http://Nabble.com" rel="nofollow" link="external" target="_blank">Nabble.com</a>.<br>
_______________________________________________<br>
rules-users mailing list<br>
</div></div><a href="http://user/SendEmail.jtp?type=node&amp;node=4022913&amp;i=1" rel="nofollow" link="external" target="_blank">[hidden email]</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" rel="nofollow" link="external" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</blockquote></div><br></div>
<br>_______________________________________________
<br>rules-users mailing list
<br><a href="http://user/SendEmail.jtp?type=node&amp;node=4022913&amp;i=2" rel="nofollow" link="external" target="_blank">[hidden email]</a>
<br><a href="https://lists.jboss.org/mailman/listinfo/rules-users" rel="nofollow" link="external" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a>

        
        
        
        <br>
        <br>
        <hr noshade size="1">
        <div style="color:#444;font:12px tahoma,geneva,helvetica,arial,sans-serif">
                <div style="font-weight:bold">If you reply to this email, your message will be added to the discussion below:</div>
                <a href="http://drools.46999.n3.nabble.com/The-buss-pass-example-of-inference-results-in-compilation-errors-how-to-solve-these-tp4022912p4022913.html" rel="nofollow" link="external" target="_blank">http://drools.46999.n3.nabble.com/The-buss-pass-example-of-inference-results-in-compilation-errors-how-to-solve-these-tp4022912p4022913.html</a>
        </div>
        <div style="color:#666;font:11px tahoma,geneva,helvetica,arial,sans-serif;margin-top:.4em;line-height:1.5em">
                
                To unsubscribe from The buss pass example of inference results in compilation errors, how to solve these?, <a rel="nofollow" link="external" target="_top">click here</a>.<br>


                <a href="http://drools.46999.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&amp;id=instant_html%21nabble%3Aemail.naml&amp;base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&amp;breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml" rel="nofollow" style="font:9px serif" link="external" target="_blank">NAML</a>
        </div></blockquote></div><br></div>


        
        
        
<br><hr align="left" width="300">
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-tp4022912p4022915.html" rel="nofollow" link="external" target="_blank">Re: [rules-users] The buss pass example of inference results in compilation errors, how to solve these?</a><div>

<div><br>
Sent from the <a href="http://drools.46999.n3.nabble.com/Drools-User-forum-f47000.html" rel="nofollow" link="external" target="_blank">Drools: User forum mailing list archive</a> at <a href="http://Nabble.com" rel="nofollow" link="external" target="_blank">Nabble.com</a>.<br>
</div></div><br>_______________________________________________<br>

rules-users mailing list<br>
<a href="http://user/SendEmail.jtp?type=node&amp;node=4022923&amp;i=2" rel="nofollow" link="external" target="_blank">[hidden email]</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" rel="nofollow" link="external" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br></blockquote></div><br></div>
_______________________________________________<br>rules-users mailing list<br><a href="http://user/SendEmail.jtp?type=node&amp;node=4022923&amp;i=3" rel="nofollow" link="external" target="_blank">[hidden email]</a><br><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank" rel="nofollow" link="external">https://lists.jboss.org/mailman/listinfo/rules-users</a></blockquote>
</div><br><br>_______________________________________________
<br>rules-users mailing list
<br><a href="http://user/SendEmail.jtp?type=node&amp;node=4022923&amp;i=4" rel="nofollow" link="external" target="_blank">[hidden email]</a>
<br><a href="https://lists.jboss.org/mailman/listinfo/rules-users" rel="nofollow" link="external" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a>

        
        
        
        <br>
        <br>
        <hr noshade size="1" color="#cccccc">
        <div style="color:#444;font:12px tahoma,geneva,helvetica,arial,sans-serif">
                <div style="font-weight:bold">If you reply to this email, your message will be added to the discussion below:</div>
                <a href="http://drools.46999.n3.nabble.com/The-buss-pass-example-of-inference-results-in-compilation-errors-how-to-solve-these-tp4022912p4022923.html" target="_blank" rel="nofollow" link="external">http://drools.46999.n3.nabble.com/The-buss-pass-example-of-inference-results-in-compilation-errors-how-to-solve-these-tp4022912p4022923.html</a>
        </div>
        <div style="color:#666;font:11px tahoma,geneva,helvetica,arial,sans-serif;margin-top:.4em;line-height:1.5em">
                
                To unsubscribe from The buss pass example of inference results in compilation errors, how to solve these?, <a href="" target="_blank" rel="nofollow" link="external">click here</a>.<br>

                <a href="http://drools.46999.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&amp;id=instant_html%21nabble%3Aemail.naml&amp;base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&amp;breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml" rel="nofollow" style="font:9px serif" target="_blank" link="external">NAML</a>
        </div></blockquote></div><br></div>


        
        
        
<br/><hr align="left" width="300" />
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-tp4022912p4022924.html">Re: [rules-users] The buss pass example of inference results in compilation errors, how to solve these?</a><br/>
Sent from the <a href="http://drools.46999.n3.nabble.com/Drools-User-forum-f47000.html">Drools: User forum mailing list archive</a> at Nabble.com.<br/>