<div dir="ltr">Thanks Mike</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jul 11, 2014 at 11:16 PM, Michael Anstis <span dir="ltr">&lt;<a href="mailto:michael.anstis@gmail.com" target="_blank">michael.anstis@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">The guided rule editors really, really, I mean really, do not handle multiple classes with the same simple name in different packages at all well.</p>

<p dir="ltr">Even if you only use a single class in a single rule (I.e. do not attempt to use x.y.z.MyClass and a.b.c.MyClass) the overall DRL being compiled can lead to issues as you&#39;re effectively creating:</p>
<p dir="ltr">&quot;import x.y.z.MyClass</p>
<p dir="ltr">rule a<br>
when<br>
MyClass (...)<br>
...<br>
end&quot;</p>
<p dir="ltr">and</p>
<p dir="ltr">&quot;import a.b.c.MyClass</p>
<p dir="ltr">rule b<br>
when<br>
MyClass (...)<br>
...<br>
end&quot;</p>
<p dir="ltr">I suspect issues to arise with class FQCN resolution in at least one of those rules.</p>
<p dir="ltr">If you cannot use different simple names then my advice is to use free-form DRL for these classes; using the FQCN in the rule and exclude the imports (from the &quot;Config&quot; tab).</p>
<p dir="ltr">Sent on the move</p><div class="HOEnZb"><div class="h5">
<div class="gmail_quote">On 11 Jul 2014 18:37, &quot;Sumit Dhaniya&quot; &lt;<a href="mailto:sumitdhaniya@gmail.com" target="_blank">sumitdhaniya@gmail.com</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

I&#39;ve two classes with same name but in different packages.<br>
I created several guided rules which use these classes when I validate<br>
individual rules they get validated but when I try to Build and Deploy the<br>
project it fails cause it try to find a field in another class.<br>
<br>
Unable to create Field Extractor for &#39;isPH&#39;Field/method &#39;isPH&#39; not found for<br>
cla<br>
ss &#39;com.****.****.db.user.TmSlot&#39;<br>
 : [Rule name=&#39;ProducerHour&#39;]<br>
org.drools.core.RuntimeDroolsException: Field/method &#39;isPH&#39; not found for<br>
class<br>
&#39;com.****.****.db.user.TmSlot&#39;<br>
<br>
Unable to Analyse Expression isPH == true:<br>
[Error: unable to resolve method using strict-mode:<br>
com.****.****.db.user.TmSlot.isPH()]<br>
[Near : {... isPH == true ....}]<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/Error-due-to-same-class-name-tp4030304.html" target="_blank">http://drools.46999.n3.nabble.com/Error-due-to-same-class-name-tp4030304.html</a><br>
Sent from the Drools: User forum mailing list archive at Nabble.com.<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>
</blockquote></div>
</div></div><br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">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></blockquote></div><br></div>