Hello,
I have a little test case as follows:
import
org.drools.builder.KnowledgeBuilderConfiguration;
import
org.drools.builder.KnowledgeBuilderFactory;
import
org.junit.Assert;
import org.junit.Test;
public class
TestDrools5Config {
@Test
public void testConfig() {
KnowledgeBuilderConfiguration
knowledgeBuilderConfiguration = KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration();
knowledgeBuilderConfiguration.setProperty("drools.dialect.java.compiler", "JANINO");
knowledgeBuilderConfiguration.setProperty("drools.dialect.java.lngLevel", "1.6");
String
droolsDialectJavaCompiler = knowledgeBuilderConfiguration.getProperty("drools.dialect.java.compiler");
System.out.println("droolsDialectJavaCompiler=" +
droolsDialectJavaCompiler);
Assert.assertNotNull(droolsDialectJavaCompiler);
String droolsDialectJavaLngLevel
= knowledgeBuilderConfiguration.getProperty("drools.dialect.java.lngLevel");
System.out.println("drools.dialect.java.lngLevel=" + droolsDialectJavaLngLevel);
Assert.assertNotNull(droolsDialectJavaLngLevel);
}
}
It fails.
I have seen the post for using JANINO with Drools:
http://lists.jboss.org/pipermail/rules-users/2009-February/008089.html
Yet this does not explain my test case failing – any ideas.
It appears as if it is not possible to set JANINO
programmatically, only via properties.conf, etc. which I don’t want to
do(!)
Cheerio,
Nic
Hemley