Drools user can not use a generic type for a function's parameter in DRL

Solution Verified - Updated -

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, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content