Re: [rules-users] Finding a sequence within the data

2008-07-31 Thread Edson Tirelli
Hehe, never underestimate creativity... :) nice solution. []s Edson 2008/7/31 Greg Barton [EMAIL PROTECTED] Never underestimate the value of data structures. Give LabResult a pointer to the next (or previous) LabResult. Then the rule becomes more comprehensible: $l1 : LabResult(

Re: [rules-users] Finding a sequence within the data

2008-07-31 Thread Yoni Mazar
Thanks for the help. We will use your ideas Edson Tirelli-3 wrote: Hehe, never underestimate creativity... :) nice solution. []s Edson 2008/7/31 Greg Barton [EMAIL PROTECTED] Never underestimate the value of data structures. Give LabResult a pointer to the next (or

Re: [rules-users] Finding a sequence within the data

2008-07-31 Thread Yoni Mazar
One more question. http://blog.athico.com/2008/07/drools-50-m1-new-and-noteworthy.html Here there is description of CEP. Do you think CEP can help us analyzing this data? Thanks, Yoni Thanks for the help. We will use your ideas Hehe, never underestimate creativity... :) nice solution.

[rules-users] Not Non-Existential Quantifier

2008-07-31 Thread ringsah
How is not supposed to work with insertLogical? Assume I have two different rules whose conditions are mutually exclusive, like the following: rule Rule One when not NegativeResult() then insertLogical(new ApplicantStatus(Approved)); end rule Rule Two when NegativeResult() then

Re: [rules-users] Finding a sequence within the data

2008-07-31 Thread Anders Hansen
Couldn't you accomplish what you are looking for using the from collect http://downloads.jboss.com/drools/docs/4.0.7.19894.GA/html_single/index.html#d0e3968 So, applied to your example it would be something like the following.  Note, I'm not sure how patient is tied to your LabResult, but I

Re: [rules-users] Not Non-Existential Quantifier

2008-07-31 Thread Ingomar Otter
Hans, If you change not NegativeResult() to not (exits NegativeResult()) this should result in the expected behaviour. Cheers, Ingomar Am 31.07.2008 um 17:19 schrieb [EMAIL PROTECTED]: How is not supposed to work with insertLogical? Assume I have two different rules whose conditions

Re: [rules-users] Not Non-Existential Quantifier

2008-07-31 Thread ringsah
Ingomar, I tried this, and indeed that worked. I was surprised, as I thought not was meant more to mean that a fact inside its parentheses did not exist, rather than a logical negation, which is the way you used it in your example. However, if I do what you said, it does work exactly how I

Re: [rules-users] Not Non-Existential Quantifier

2008-07-31 Thread Edson Tirelli
Hans, Your reasoning is correct. There should not be 2 instances of ApplicantStatus in the working memory. Can you provide a test case showing the problem? we have test cases here using not and logical assertions, and it works properly. Thanks, Edson 2008/7/31 [EMAIL

Re: [rules-users] Not Non-Existential Quantifier

2008-07-31 Thread Edson Tirelli
Hmm, in this case, it is definitively a bug. not IS the existential qualifier, i.e., the constrary of exists. So it should be simply redundant to write not exists. Need to investigate that. []s Edson 2008/7/31 [EMAIL PROTECTED] Ingomar, I tried this, and indeed that worked. I was

Re: [rules-users] Not Non-Existential Quantifier

2008-07-31 Thread Ingomar Otter
Hans, I checked the docs and as Edson says it should work without the exists( ). Strange that never worked for me. Maybe we all learn something if you can carve out a test-case. Strange. --I Am 31.07.2008 um 19:29 schrieb [EMAIL PROTECTED]: Ingomar, I tried this, and indeed that worked.

[rules-users] Compiling .drl files inside of a JUnit test

2008-07-31 Thread Ron Kneusel
I'm sure other people have run into this. I'm trying to build a unit test that checks the compilation of an external .drl file. My questions are: How do I get the compiler to locate all the .class files that I reference? When JUnit runs, where does it run from or how can its runtime

Re: [rules-users] Reusing predicates

2008-07-31 Thread Edson Tirelli
Not sure if you are worried about syntax or performance. If you are worried about performance, just write your common Patterns in the same order among your multiple rules and the engine will reuse them. If you are worried about the syntax, i.e. not replicating the same code among multiple