Nice, thanx for that :)

"Smith, Philip" <[EMAIL PROTECTED]> wrote:  
You can also do it by simply breaking the rules into multiple .drl files
and a loading then with a piece of code such as below.

RuleBaseBuilder builder = new RuleBaseBuilder();

for (Iterator i = ruleSets.iterator(); i.hasNext();) {
String ruleSetUrl = (String) i.next();
java.net.URL resource =
DroolsWorkingMemory.class.getResource(ruleSetUrl);

if (resource == null)
throw new
XXXXException(XXXXException.WORKING_MEMORY_ERROR,
"Invalid resource URL: " + ruleSetUrl);

RuleBase aRuleBase = RuleBaseLoader.loadFromUrl(resource);

for (Iterator j = aRuleBase.getRuleSets().iterator();
j.hasNext();) {
RuleSet ruleSet = (RuleSet) j.next();
builder.addRuleSet(ruleSet);
}
}
mRuleBase = builder.build();

Regards,


Philip Smith
[EMAIL PROTECTED]
(650) 628-7941 (x87941)


-----Original Message-----
From: Mark Proctor [mailto:[EMAIL PROTECTED] 
Sent: Sunday, February 19, 2006 4:51 AM
To: [email protected]
Subject: Re: [drools-user] Drools and modules ?

Its in Drools 3.0, we call them Agenda Groups.

Mark
sol myr wrote:
> Hi,
> 
> I know that some rule engines support modules (so that large
rule-bases can be broken into several files,).
> Is this supported in Drools ?
> 
> If so, how (just a quick pointer will do, of course).
> 
> Thanks very much :)
> 
>
> fkzeljo wrote:
> 
> Hi,
>
> I am using my own condition and java:consequence element. I get an
> java.lang.NoSuchMethodError exception.
> Caused by: java.lang.NoSuchMethodError:
> org.codehaus.janino.Java$MethodInvocation. <
>
init>(Lorg/codehaus/janino/Location;Lorg/codehaus/janino/Java$Scope;Lorg
/codehaus/janino/Java$Atom;Ljava/lang/String;[Lorg/codehaus/janino/Java$
Rvalue;)V
> at
>
org.drools.semantics.java.JavaScriptEvaluator.addDeclarations(JavaScript
Evaluator.java:313)
> at org.drools.semantics.java.JavaScriptEvaluator. <
> init>(JavaScriptEvaluator.java:138)
>
> I am using janino.jar from version janino-2.3.17 and
drools-all-jdk5-2.1.jar
>
> By the way I am using jdk1.4.
>
> Could someone tell if I am using an incorrect .jar or if I am missing
> something else. 
> --
> View this message in context:
http://www.nabble.com/Janino-jar-and-no-such-method-exception-when-using
-java%3Aconcequences-t1132124.html#a2964273
> Sent from the drools - user forum at Nabble.com.
>
>
>
> 
> ---------------------------------
> Yahoo! Mail
> Use Photomail to share photos without annoying attachments.
> 



                
---------------------------------
 
 What are the most popular cars? Find out at Yahoo! Autos 

Reply via email to