Drools user can not use a generic type for a function's parameter in DRL
Issue
User can not use a generic type for a function's parameter in DRL.
How to reproduce the issue
- On business-central, write a drl like this. If I click "validate" button, it says ok
import java.util.List
function void getMinFrom(List lists) {
System.out.println("hello");
}
rule hello
when
then
System.out.println("Hello");
end
- Modify the drl as follows. If I click "validate" button, error messages[1] shows up
import java.util.List
function void getMinFrom(List<String> lists) {
System.out.println("hello");
}
rule hello
when
then
System.out.println("Hello");
end
[1]Validation Error
[ function getMinFrom (line:4): Unable to resolve type List<String> while building function. java.lang.ClassNotFoundException: Unable to find class 'List<String>' ]
Environment
- Red Hat JBoss BRMS
- 6.0.x
- 6.1.x
- 6.2.0
- Red Hat JBoss BPMS
- 6.0.x
- 6.1.x
- 6.2.0
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
