Details
-
Bug
-
Resolution: Not a Bug
-
Major
-
None
-
None
-
None
-
None
-
2020 Week 52-03 (from Dec 21)
-
Undefined
-
NEW
-
NEW
-
---
-
---
Description
I use drools as follow:
import org.kie.internal.utils.KieHelper; // code placeholder public static final ResourceType LOCAL_DRL = ResourceType.addResourceTypeToRegistry("DRL", "Drools Rule Language", "src/main/resources/com/jiang", "drl"); public KieSession loadForRule2(String drlStr) { KieHelper helper = new KieHelper(); helper.addContent(drlStr, LOCAL_DRL); return helper.build().newKieSession(); }
This param defaultPath dose not work, I see that the code is fixed,
// code placeholder private String generateResourceName(ResourceType type) { return "src/main/resources/file" + counter++ + "." + type.getDefaultExtension(); }
I think it should be changed as follows
// code placeholder private String generateResourceName(ResourceType type) { return type.getDefaultPath() + counter++ + "." + type.getDefaultExtension(); }
Now,i use another function to temporarily solve
// code placeholder helper.addContent(drlStr, "/com/jiang/ww.drl");