[rules-users] PackageBuilderConfigurations and RuleFlows Drools 5

Joe White Joe.White at recondotech.com
Wed Nov 19 13:10:31 EST 2008


Keith,
If you're using the Java dialect try this syntax

Try this syntax:
	JavaDialectConfiguration javaConf = (JavaDialectConfiguration)
pkgBuilderCfg.getDialectConfiguration( "java" );
	javaConf.setCompiler( JavaDialectConfiguration.JANINO );

	PackageBuilder builder = new PackageBuilder(pkgBuilderCfg);


Joe

-----Original Message-----
From: rules-users-bounces at lists.jboss.org
[mailto:rules-users-bounces at lists.jboss.org] On Behalf Of keithnielsen
Sent: Wednesday, November 19, 2008 8:30 AM
To: rules-users at lists.jboss.org
Subject: [rules-users] PackageBuilderConfigurations and RuleFlows Drools
5


I have the following code:

PackageBuilder packageBuilder = null;
Properties properties = new Properties();
properties.setProperty( "drools.dialect.java.compiler","JANINO" );
PackageBuilderConfiguration cfg = new PackageBuilderConfiguration(
properties );
//error was thrown here complaining about JDT Core not being on
classpath
prior to me creating 
//configuration and adding Janino jar file to classpath of the plug-in
packageBuilder = new PackageBuilder(cfg);

.
.
.
packageBuilder.addRuleFlow(source);

I receive the "The Eclipse JDT Core jar is not in the classpath" error
message.
I was wondering why since I had created a PackageBuilderConfiguration
and
added it to the packagebuilder.
Stepping through the code it appears that the call stack looks like the
following:

packageBuilder.addRuleFlow(source);
ProcessBuilder.addProcessFromFile(.....);
PackageBuilderConfiguration.init(....);

Question is why is the ProcessBuilder not using the
PackageBuilderConfiguration created previously and set on the package
builder and instead creating a new instance? I don't have anywhere to
configure the ProcessBuilder since this is internal to the call on the
packageBuilder.addRuleFlow

Thanks

-- 
View this message in context:
http://www.nabble.com/PackageBuilderConfigurations-and-RuleFlows-Drools-
5-tp20582230p20582230.html
Sent from the drools - user mailing list archive at Nabble.com.

_______________________________________________
rules-users mailing list
rules-users at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users




More information about the rules-users mailing list