I'm upgrading to Drools 5.4 from Drools 5.0.1.  When I try to compile the
.drl files into a .pkg I'm getting a couple of strange errors.  Hoping
someone can help.

Here is the .drl

rule "Rule 1 - Testing" 
no-loop true
        when 
                $orderInfo : OrderingInfo (orderedProducts != null)
        then
                Customer customer = $orderInfo.getCustomer();
                ArrayList<ProductAttribute> productAttributes =
$orderInfo.getAttributes();
                String localCode = getCode();
end


function String getCode (Customer customer) {
        return customer.getCode();
}       


I get an error when I try to compile saying the following:
    Unable to resolve type ArrayList<ProductAttribute>
    If I remove the line and just use ArrayList and leave off the
"<ProductAttribute>" component, it works.
    Any help is appreciated.

It also cannot access the getCode() function.
    I'm not sure why that is the case.

Finally, I can get all of these things to work when I run the rules using
the .DRL files.  Typically we compile them into packages prior to
deployment.

Thank you again in advance for any/all of your help.










--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-Upgrade-to-5-4-tp4019321.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to