There&#39;s also a quirk regarding the class resolution:-<br><br>Given Person class:-<br>
<br>
<span style="font-family: courier new,monospace;">package com.guvnor.domain;</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">import java.math.BigDecimal;</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">public class Person {</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"></span><span style="font-family: courier new,monospace;">    private BigDecimal salary;</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"></span><span style="font-family: courier new,monospace;">    public BigDecimal getSalary() {</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">        return salary;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">    }</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">    public void setSalary(BigDecimal salary) {</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">        this.salary = salary;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">    }</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"></span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">}</span><br style="font-family: courier new,monospace;">
<br><br>The following compiles OK:-<br><br><div style="margin-left: 40px;"><span style="font-family: courier new,monospace;">package com.sample</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> </span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">import com.guvnor.domain.Person</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"></span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">declare Person</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">end</span><br></div><br>However the following does not (without explicitly importing <span style="font-family: courier new,monospace;">java.math.BigDecimal</span> - which is a field type in Person):-<br>
<br><div style="margin-left: 40px;"><span style="font-family: courier new,monospace;">package com.sample</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> </span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">import com.guvnor.domain.Person</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">import com.guvnor.domain.Address</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">declare Person</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">end</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace; color: rgb(255, 0, 0);">declare Person2 extends Person</span><br style="font-family: courier new,monospace; color: rgb(255, 0, 0);">
<span style="font-family: courier new,monospace; color: rgb(255, 0, 0);">    flange : String</span><br style="font-family: courier new,monospace; color: rgb(255, 0, 0);"><span style="font-family: courier new,monospace; color: rgb(255, 0, 0);">end</span><br>
</div><br>Error being &quot;Unknown DroolsError class org.drools.compiler.TypeDeclarationError: Unable to find class &#39;BigDecimal&#39; &quot;.<br><br>With kind regards,<br><br>Mike<br><br><div class="gmail_quote">On 11 July 2011 08:41, Wolfgang Laun <span dir="ltr">&lt;<a href="mailto:wolfgang.laun@gmail.com">wolfgang.laun@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Subsection 5.7.7 discusses &#39;extends&#39; and describes how it is done for types declared in Java.<br>
<br>One finesse is apparently not documented: Java types must be proper JavaBeans; otherwise the construction of the accessors will fail. (Try, for instance, a property with a getter but no matching setter.) <br>
<br>HTH<br>-W<br><br><br><div class="gmail_quote"><div><div></div><div class="h5">On 10 July 2011 22:29, Michael Anstis <span dir="ltr">&lt;<a href="mailto:michael.anstis@gmail.com" target="_blank">michael.anstis@gmail.com</a>&gt;</span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">
What&#39;s the rules around declared types extending another (declared) type?<br><br>I&#39;ve been asked to provide for declared type extension in Guvnor (by Prakash) but the Expert user-guide doesn&#39;t say it exists at the engine level.<br>


<br>I tried &quot;declare MyType extends java.util.ArrayList&quot; and received a parser\compiler error stating &quot;java.util.ArrayList was not a declared type&quot; (or words to that effect) so some form of extension appears possible.<br>


<br>Thanks,<br><br>Mike<br>
<br></div></div>_______________________________________________<br>
rules-dev mailing list<br>
<a href="mailto:rules-dev@lists.jboss.org" target="_blank">rules-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
<br></blockquote></div><br>
<br>_______________________________________________<br>
rules-dev mailing list<br>
<a href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
<br></blockquote></div><br>