Die statische Java-Klasse und Methodencode ist:geifert importiert statische Java-Methode
public class DroolsStringUtils {
public static boolean isEmpty(String param) {
if (param == null || "".equals(param)) {
return true;
}
return false;
}
}
und die TFL-Code ist:
package com.rules
import com.secbro.drools.utils.DroolsStringUtils.isEmpty;
rule CheckIsEmpty
when
isEmpty("");
then
System.out.println("the param is not empty");
end
aber die Idee Hinweise "nicht relove" auf der Methode 'isEmpty (""). Ich möchte nur eine statische Methode von Java-Klasse in Drl-Datei importieren.
aber es funktioniert nicht!
die drools Version ist 7.0.0.Final – secbro
die IDEE ist intellij IDEA 2016.3 – secbro