[rules-users] Drools 5.4 and Java Generics

dxande6 dxande6 at qwest.com
Tue Aug 21 18:32:48 EDT 2012


I’m receiving errors when compiling my .drl files as a result of using Java
generics.

Example:

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(customer);
end
It complains that ArrayList<ProductAttribute> cannot be resolved … actual
error is below:

    RuleBaseTask failed: Unable to resolve type ArrayList<ProductAttribute>:
    Unable to find class 'ArrayList<ProductAttribute>' : [Rule name='Rule 1
- Testing']

Is there a resolution to this problem?

Thank you in advance.





--
View this message in context: http://drools.46999.n3.nabble.com/Drools-5-4-and-Java-Generics-tp4019327.html
Sent from the Drools: User forum mailing list archive at Nabble.com.



More information about the rules-users mailing list