See below.<br><br><div class="gmail_quote">On 21 August 2012 21:05, dxande6 <span dir="ltr">&lt;<a href="mailto:dxande6@qwest.com" target="_blank">dxande6@qwest.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I&#39;m upgrading to Drools 5.4 from Drools 5.0.1.  When I try to compile the<br>
.drl files into a .pkg I&#39;m getting a couple of strange errors.  Hoping<br>
someone can help.<br>
<br>
Here is the .drl<br>
<br>
rule &quot;Rule 1 - Testing&quot;<br>
no-loop true<br>
        when<br>
                $orderInfo : OrderingInfo (orderedProducts != null)<br>
        then<br>
                Customer customer = $orderInfo.getCustomer();<br>
                ArrayList&lt;ProductAttribute&gt; productAttributes =<br>
$orderInfo.getAttributes();<br>
                String localCode = getCode();<br>
end<br>
<br>
<br>
function String getCode (Customer customer) {<br>
        return customer.getCode();<br>
}<br>
<br>
<br>
I get an error when I try to compile saying the following:<br>
    Unable to resolve type ArrayList&lt;ProductAttribute&gt;<br>
    If I remove the line and just use ArrayList and leave off the<br>
&quot;&lt;ProductAttribute&gt;&quot; component, it works.<br>
    Any help is appreciated.<br></blockquote><div><br>The DRL parser does not recognize generics. Omit &quot;&lt;...&gt;&quot;.<br><br> </div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

<br>
It also cannot access the getCode() function.<br>
    I&#39;m not sure why that is the case.<br></blockquote><div><br>The function getCode() requires an argument. And (I think) its definition should precede its references.<br> </div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

<br>
Finally, I can get all of these things to work when I run the rules using<br>
the .DRL files.  Typically we compile them into packages prior to<br>
deployment.<br></blockquote><div><br>Not sure what you mean here. If it doesn&#39;t compile, you can&#39;t &quot;run&quot; it.<br><br>-W<br> </div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

<br>
Thank you again in advance for any/all of your help.<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/Drools-Upgrade-to-5-4-tp4019321.html" target="_blank">http://drools.46999.n3.nabble.com/Drools-Upgrade-to-5-4-tp4019321.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">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>