<br>&nbsp;&nbsp;&nbsp; Eric, <br><br>&nbsp;&nbsp;&nbsp; Please do! Thanks,<br>&nbsp;<br>&nbsp;&nbsp; Edson<br><br><div><span class="gmail_quote">2007/7/26, Eric Miles &lt;<a href="mailto:eric.miles@kronos.com">eric.miles@kronos.com</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Edson,<br><br>That certainly makes sense.&nbsp;&nbsp;However I&#39;m fairly certain that in<br>referencing the inner class in rule definition, I always qualified it<br>with the outer class name, ie:<br><br>DataClass.AlternativeKey()
<br>or<br>AnotherClass.AlternativeKey()<br><br>I appreciate your explaination of the &quot;merge&quot; process.&nbsp;&nbsp;Rather than have<br>you spend any more time on this, I&#39;ll try to put together a test case to<br>ensure I was seeing the behavior I thought I was seeing.&nbsp;&nbsp;I probably
<br>won&#39;t get around to this until tonight or the weekend.<br><br>If I was mistaken, I&#39;ll let you (and the mailing list) know.&nbsp;&nbsp;If I was<br>not, would you like me to open a JIRA with the attached test case?&nbsp;&nbsp;I<br>
would assume that if the inner classes contain the qualified name that<br>the engine should be able to handle that?<br><br>Thanks,<br>Eric<br><br>Edson Tirelli wrote:<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Eric,<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Thanks, I understand now.
<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;What happens is that if both DRL files declare the same package<br>&gt; name, all their contents will be merged. It means that you would end up<br>&gt; with both imports in the same namespace:<br>&gt;
<br>&gt; import com.company.DataClass.AlternativeKey;<br>&gt; import com.company.AnotherClass.AlternativeKey;<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;And so the engine will raise an error saying that it does not know<br>&gt; which one you are refering to when you write simply:
<br>&gt;<br>&gt; AlternativeKey<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; I think the engine behavior is correct, since the idea of loading<br>&gt; two different files with the same name space into the same package<br>&gt; builder is to merge them, or even replace (update) that eventually have
<br>&gt; the same name.<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; What do you think?<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Edson<br>&gt;<br>&gt;<br>&gt; 2007/7/26, Eric Miles &lt;<a href="mailto:eric.miles@kronos.com">eric.miles@kronos.com</a><br>&gt; &lt;mailto:
<a href="mailto:eric.miles@kronos.com">eric.miles@kronos.com</a>&gt;&gt;:<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Edson,<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; I have since changed my schema but here was my issue:<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; rule1.drl:<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; import 
com.company.DataClass.AlternativeKey;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; import com.company.DataClass;<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; rule &quot;Some rule&quot;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; when<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DataClass.AlternativeKey(someParm == true)<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; then
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ...<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; end<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Different drlf file:<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; rule2.drl<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; import com.company.AnotherClass.AlternativeKey;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; import com.company.AnotherClass;<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; rule &quot;Another rule&quot;
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; when<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AnotherClass.AlternativeKey(diffParm == 1)<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; then<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ...<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; end<br>&gt;<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; This was the gist of what I was doing.&nbsp;&nbsp;The outer classes&#39; names
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; were different, it was the INNER class of each of these classes that<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; had the same name.&nbsp;&nbsp;I was actually getting compile errors on the<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; import statements.&nbsp;&nbsp;Like I said, these rules worked fine if loaded
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; separately, but once I tried to put them all int he same rule base,<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; I was getting the import collision error.&nbsp;&nbsp;Later on this evening<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; (when I&#39;m not at work), I&#39;ll try to put together a small test case
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; and upload it.&nbsp;&nbsp;In the meantime, you can look skim over this and let<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; me know if something jumps out at you.<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Thanks,<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Eric<br>&gt;<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; On Thu, 2007-07-26 at 10:32 -0300, Edson Tirelli wrote:
<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Eric,<br>&gt;&gt;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Not sure if I understood your problem, but if you have<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; multiple classes with the same name, and the only difference is<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; that they are inner classes of different classes, I guess what you
<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; need to do is to fully qualify your class names in your rules...<br>&gt;&gt;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; rule xxx<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; when<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; my.package.MyClass.MyInnerClass( ... )<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; ...<br>
&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; end<br>&gt;&gt;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If this is not your problem, can you please show us an example<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; so we understand it better?<br>&gt;&gt;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Edson<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; 2007/7/25, Eric Miles &lt;
<a href="mailto:eric.miles@kronos.com">eric.miles@kronos.com</a><br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;mailto:<a href="mailto:eric.miles@kronos.com">eric.miles@kronos.com</a>&gt;&gt;:<br>&gt;&gt;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Due to how JAXB treats anonymous inner complex types, I ended
<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; up with a public static inner classes named AlternativeKey in<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; several of my data classes&nbsp;&nbsp;I have several rules written to<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; deal with each data class individually that all work ok.
<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; However, when I attempt to put them all in the same rule base<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (all belong to the same package), I get an import collision<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exception on the AlternativeKey inner class.&nbsp;&nbsp;Depending on
<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; where in the builder I add the resource depends on which<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AlternativeKey the compiler bitches about (validity).&nbsp;&nbsp;I&#39;m not<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; familiar with the source at all, so I&#39;m unsure as to where to
<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; look for this.&nbsp;&nbsp;However, this sounds like a bug to me?&nbsp;&nbsp;There<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; is an easy workaround for this as I I just don&#39;t use anonymous<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; types and define them in my schema explicitly.&nbsp;&nbsp;Just thought
<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I&#39;d identify this as a possi ble issue.<br>&gt;&gt;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Thanks,<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Eric<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _______________________________________________
<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rules-users mailing list<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a> &lt;mailto:<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org
</a>&gt;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; --<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Edson Tirelli
<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Software Engineer - JBoss Rules Core Developer<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Office: +55 11 3529-6000<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Mobile: +55 11 9287-5646<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; JBoss, a division of Red Hat @ <a href="http://www.jboss.com">
www.jboss.com</a> &lt;<a href="http://www.jboss.com">http://www.jboss.com</a>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt; --<br>&gt;&nbsp;&nbsp; Edson Tirelli<br>&gt;&nbsp;&nbsp; Software Engineer - JBoss Rules Core Developer<br>&gt;&nbsp;&nbsp; Office: +55 11 3529-6000
<br>&gt;&nbsp;&nbsp; Mobile: +55 11 9287-5646<br>&gt;&nbsp;&nbsp; JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a> &lt;<a href="http://www.jboss.com">http://www.jboss.com</a>&gt;<br>&gt;<br>&gt;<br>&gt; ------------------------------------------------------------------------
<br>&gt;<br>&gt; _______________________________________________<br>&gt; rules-users mailing list<br>&gt; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users">
https://lists.jboss.org/mailman/listinfo/rules-users</a><br><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">https://lists.jboss.org/mailman/listinfo/rules-users</a><br></blockquote></div><br><br clear="all"><br>-- <br>&nbsp;&nbsp;Edson Tirelli<br>&nbsp;&nbsp;Software Engineer - JBoss Rules Core Developer
<br>&nbsp;&nbsp;Office: +55 11 3529-6000<br>&nbsp;&nbsp;Mobile: +55 11 9287-5646<br>&nbsp;&nbsp;JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a>