<br>   There were some changes in the latest MVEL release making it more strict on type resolution. We caught most of the scenarios and changed the code accordingly, but we probably missed this one.<br><br>   Could you please open a JIRA with this description of the problem? I will fix it asap.<br>
<br>   Thanks,<br><br>   []s<br>   Edson<br><br><div class="gmail_quote">2009/3/15 CK <span dir="ltr">&lt;<a href="mailto:chrisckc@gmail.com">chrisckc@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
So I did further testing and I was able to narrow it down.<br>
<br>
Somehow the culprit is with the import statements.  My DRL file has a package name of:<br>
<br>
package com.test.abc<br>
dialect &quot;mvel&quot;<br>
<br>
So, it appears that in drools using MVEL, a fully qualified name is required to instantiate the class?  It&#39;s quite strange though.  Considering that I&#39;m following the docs, I should be able to dynamically create a new type declaration instance without qualifying it.<br>

<br>
The following somehow works:<br>
<br>
then<br>
  insert(new com.test.abc.Domestic());<br>
end<br>
<br>
Why is drools/mvel being so strict?<br><font color="#888888">
<br>
-ck</font><div><div></div><div class="h5"><br>
<br>
On Mar 15, 2009, at 4:23 AM, CK wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
<br>
I&#39;m wondering if I am doing something wrong in my code:<br>
<br>
I create dummy type declarations to indicate presence of certain states (is there possibly a better way of doing this?):<br>
<br>
declare Domestic<br>
 dummy : boolean<br>
end<br>
<br>
declare Multiple<br>
 dummy : boolean<br>
end<br>
<br>
rule &quot;...&quot;<br>
  when<br>
        ......<br>
   then<br>
        insert(new Domestic());<br>
end<br>
<br>
<br>
Something like this is giving me the following errors during DRL file parsing:<br>
<br>
Unable to build expression for &#39;consequence&#39;: Failed to compile: 1 compilation error(s):<br>
- (0,0) could not resolve class: Domestic &#39;    insert(new Domestic());<br>
<br>
<br>
Based on what the docs say, this should generate the proper dynamic classes and I should immediately be able to use the declared types.<br>
<br>
I did additional checking by outputting the registered Type Declarations.  These two types are indeed registered in the PackageBuilder.getPackage().getTypeDeclarations().<br>
<br>
So I can only guess that either I&#39;m doing something wrong here or there is a bug in the CR1 release.<br>
<br>
<br>
</blockquote>
<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>  Edson Tirelli<br>  JBoss Drools Core Development<br>  JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>