Re: [rules-users] How to limit results from a collect statement

2007-08-20 Thread pentarious
I found an interesting implementation to do that. If anyone is interested I could share my solution. Regards, CG Mark Proctor wrote: > > There is no supported way to do this. You could use an inline-eval > against a global, but that is very clunkey. However it does seem like a > good featur

Re: [rules-users] Drools - is dynamic change possible ?

2007-08-20 Thread pns77
Any suggestions / guidance for the below question ? pns77 wrote: > > Hi, > > The following is the block of code that i tried > > RuleBase ruleBase = readRule(); > WorkingMemory workingMemory = > ruleBase.newStatefulSession(false); // to keep reference > //

Re: [rules-users] Re: Odd static inner class behavior

2007-08-20 Thread Fernando Meyer
Hi Eric, after some tests I noticed that in java language you can't import the same class name twice even if the class is defined in different packages, ie try creating a java file and import both java.awt.List and java.util.List, it won't work, you will get a similar error from javac compi

[rules-users] Are rules with time windows supported? Thanks.

2007-08-20 Thread Anh Vuong
Hi, My understanding is that time window rule is not supported yet in 4.0 after checking the manual and followed some blogs regarding SEP/CEP. I wonder if some workaround can be done for simple case such as collect some similar events over 1 minute. Will time window feature be included soon?

Re: [rules-users] Logic Problems & drools

2007-08-20 Thread Mark Proctor
btw you don't need janino if you have jdt core. This is standard java, there is no reason for this not to work, must be the way you are setting up your classpath. Btw there is the 4.0.1 SNAPSHOT available now. Did you rememer to add mvel? http://cruisecontrol.jboss.com/cc/artifacts/jboss-rules

Re: [rules-users] Logic Problems & drools

2007-08-20 Thread Ellen Ning Zhao
I had exactly the same problem when I was evaluating the submissions from last round. Here is a fragment from my .bashrc: export DROOLS_HOME=/home//drools-4.0.0.SNAPSHOT-bin.zip_FILES/ export CLASSPATH=$CLASSPATH:$DROOLS_HOME/drools-compiler-4.0.0.SNAPSHOT.jar:$DROOLS_HOME/drools-core-4.0.0.S

Re: [rules-users] Logic Problems & drools

2007-08-20 Thread MarkA
I've tried that. I copied all the drools jars (14 of them) into a directory and then used that on the classpath - didn't work. I also searched for every jar file on my Mac, put them all in there and tried again - failed. It's only Drools I have a problem with, anything else I create works fine.

RE: [rules-users] Problem with Student - module example

2007-08-20 Thread Anstis, Michael \(M.\)
I assume you also insert s1 and m1 to working memory? What if you re-write the rule as two patterns (there is an implicit AND between patterns) Rule: $student : Student() Module( student == $student && score > 40 ) ) With kind regards, Mike -Original Message- From: [EMAIL PROTECTED] [

[rules-users] Problem with Student - module example

2007-08-20 Thread Dave, Rajeev
Given: Student.java public class Student { private String name; private ArrayList modules = new ArrayList(); ... } Module.java public class Module { private String name; private Student student; private int score; ... } Rule: exists( $student : Student() && Module( student

Re: [rules-users] Logic Problems & drools

2007-08-20 Thread Manjax23
Basically the classes you are using are not present in your applications classpath. Put all the drools jar files and the dependent jar files in the class path and run. java -classpath drools.jar;drools-compiler.jar;;SonsAgesPuzzle.jar <<(optionally classname here)>> Hope this works. Thanks

Re: [rules-users] Logic Problems & drools

2007-08-20 Thread MarkA
Hi, I downloaded the two examples. If I try to run the jar one I get the classdefnotfound error: java -jar SonsAgesPuzzle.jar Exception in thread "main" java.lang.NoClassDefFoundError: org/drools/WorkingMemory Any ideas? I get this whenever I try to run my own Drools stuff outside ecl