Re: [rules-users] Rule problem

2009-05-04 Thread Wolfgang Laun
One thing you ought to observe is a strict textual identity of all literals. So, the limit "thirty-point-zero" shouldn't be written as "30.0" in one place and "30" in another if a seamless or non-overlapping set of intervals [x,30[ and [30,y] is desired. (There ought to s.th. like "const" or "fina

Re: [rules-users] setGlobal issue in StatefulSession

2009-05-04 Thread Greg Barton
Setting a global that is a subclass of the global reference works fine. See attached code. --- On Mon, 5/4/09, Mere Huzoor wrote: > From: Mere Huzoor > Subject: Re: [rules-users] setGlobal issue in StatefulSession > To: greg_bar...@yahoo.com, "Rules Users List" > Date: Monday, May 4, 2009, 1

Re: [rules-users] Rule problem

2009-05-04 Thread Greg Barton
Not really. :) I don't work with ruleflows. Attached is an implementation using BigDecimal. It should avoid any floating point problems. Make sure and use BigDecimal with the pure java version if you want a true measure of relative performance. --- On Mon, 5/4/09, Femke De Backere wrote: >

Re: [rules-users] Help with MatchesEvaluatorsDefinition that caches compiled regular expression patterns

2009-05-04 Thread Edson Tirelli
Jared, Your idea is actually interesting. Although, we would need to take care of a few edge scenarios: * The actual evaluator instance is supposed to be a "fly weight" implementation, and as so, it might be used by multiple threads. So, first thing, the cache map implementation must be thr

Re: [rules-users] Rule problem

2009-05-04 Thread Femke De Backere
I have another little problem. I try to do the same with a ruleflow (and BMI rules in ruleflow group) and my ruleflow starts running and the rules are triggered, but I get no system.out.println(...) and mijn flow doesn't continue to the next node. Any suggestions? Femke Op 4-mei-09, om 23

[rules-users] Help with MatchesEvaluatorsDefinition that caches compiled regular expression patterns

2009-05-04 Thread Jared Davis
I need some help placing a cache of compiled regular expressions using the MatchesEvaluatorsDefinition as a starting point. Just for a test I placed a static map in the class: static Map uglyHack = new HashMap(); Then in each of the evaluators I have different versions of: Pattern p =

Re: [rules-users] Rule problem

2009-05-04 Thread Greg Barton
I wonder if there's some way to introduce strictfp into the drl. (I'm not even sure if that would even solve the problem. But I figure it'd get you in the ballpark.) But I think it would be useful to be able to inject strictfp into the declarations of any generated drools classes. --- On Mon

Re: [rules-users] Rule problem

2009-05-04 Thread Femke De Backere
But I used Greg's code with only int's and it really doesn't work. Op 4-mei-09, om 21:48 heeft Wolfgang Laun het volgende geschreven: Don't use doubles. Try the same thing, scaling the random weights with 10 (or 100) convert to int, and use suitably scaled integer limits for your weight clas

[rules-users] Effective-date in decision tables

2009-05-04 Thread Bhamidi, Krishna
Is there a way I can set effective-date for rules in decision tables? It does not appear in any of the key-words of a decision table syntax. Thank you, Krishna ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/list

Re: [rules-users] Rule problem

2009-05-04 Thread Femke De Backere
I solved the problem by removing every double in the sample.drl. How van I fix the double problem if I really wanted to :)? In this case it is unnecassary but there must be a solution? Thanks for all the help! Femke Op 4-mei-09, om 21:48 heeft Wolfgang Laun het volgende geschreven: Don't u

Re: [rules-users] Hibernate proxy objects equality tests failing in Drools 5

2009-05-04 Thread Guto
Thanks Greg, But it´s not a lazy loading problem at all. I am not using any kind of lazy attribute inside the statefull drools session... Unfortunelly, i´ve just upgrade from drools 4GA to 5CR1 and the problem persist. Now I will try to make CLONES of the objects the came from the bank, just to s

Re: [rules-users] Hibernate proxy objects equality tests failing in Drools 5

2009-05-04 Thread Greg Barton
Do you need the lazy loading functionality that proxies provide? It seems to me that if you have an EJB call that's providing the objects loaded from hibernate, that's probably not the case. (i.e. once the objects are loaded and returned by the EJB method, the hibernate session may no longer b

Re: [rules-users] Rule problem

2009-05-04 Thread Wolfgang Laun
Don't use doubles. Try the same thing, scaling the random weights with 10 (or 100) convert to int, and use suitably scaled integer limits for your weight classes. I'm not at all sure, what various JVM versions and/or Rand generators could produce. The javadoc for java.lang.Math is an indicator th

Re: [rules-users] Hibernate proxy objects equality tests failing in Drools 5

2009-05-04 Thread Guto
Just now I notice one thing. The application that i am building is compleatly EJB centric. I have um EJB project that usually do all the database stuff, and another EJB project for the drools rules. Lets call them EJB-DATA and EJB-DROOLS. When the client calls for an specific data that must be thre

[rules-users] Sharing packages between rule bases?

2009-05-04 Thread Ingomar Otter
Hello @all. We are generating quite some rules and we have handcrafted rules. We'd like to combine both into RuleBases that we use for a limited time. So far we have parsed the "static packages" and merged these into RuleBases we create. We hang on to the "static" packages to avoid unnnecessa

Re: [rules-users] Hibernate proxy objects equality tests failing in Drools 5

2009-05-04 Thread Guto
In fact, i´m really using JPA with hibernate as an provider. Could you send me your hibernate config? I will compare some proprieties of tyour hibernate.config with my persistence.xml. I plenty sure that the rule is ok, since it is working with the unit test. If you need any help to mimic what y

Re: [rules-users] Rule problem

2009-05-04 Thread Femke De Backere
So, I did as you suggested, with the following as result: BMI of 10 U heeft ondergewicht: 10 BMI of 30 U heeft ondergewicht: 30 BMI of 30 U heeft obesitas: 30 BMI of 20 U heeft ondergewicht: 20 So, I really don't get it, I used exactly the same code as you. Femke Op 4-mei-09, om 17:11 heeft Gre

Re: [rules-users] setGlobal issue in StatefulSession

2009-05-04 Thread Mere Huzoor
Please ignore the syntax in this posting. Yes, it is suppose to be like this: public abstract class Base { } I would appreciate if you can explain how I can achieve the polymorphism behavior in drools (explained in my example). FYI I'm using version 4.0.7. Thanks! On Mon, May 4, 2009 at 10:57

Re: [rules-users] setGlobal issue in StatefulSession

2009-05-04 Thread Greg Barton
Well, we can start out with the fact that this is improper java syntax: class abstract Base () {} The () is not in a class declaration. Does this code compile for you? :) --- On Mon, 5/4/09, tellkb wrote: > From: tellkb > Subject: [rules-users] setGlobal issue in StatefulSession > To: rules

[rules-users] setGlobal issue in StatefulSession

2009-05-04 Thread tellkb
Hi there, I want to set setGlobal in working memory at run time based on derived class, e.g. DerivedOne or DerivedTwo. But it throws following error: Illegal class for global. Expected [org.comp.app.bean.Base], found [org.comp.app.bean.DerivedOne]. It should automatically resolve the d

Re: [rules-users] Hibernate proxy objects equality tests failing in Drools 5

2009-05-04 Thread Greg Barton
I'm using non-proxied hibernate backed POJOs in drools with no problems. (THe pojos aer generaed by hbm2java.) I'll try configuring for proxies to see what happens. --- On Mon, 5/4/09, Gustavo Maia Neto wrote: > From: Gustavo Maia Neto > Subject: Re: [rules-users] Hibernate proxy objects e

Re: [rules-users] Rule problem

2009-05-04 Thread Femke De Backere
Ok! I will give it a try! I expect the plain java class to win, but I need to do the tests for my thesis ;). Femke Op 4-mei-09, om 17:11 heeft Greg Barton het volgende geschreven: Well, approach this systematically, then: Create a new Drools project in Eclipse and replace the DroolsTest.j

Re: [rules-users] Rule problem

2009-05-04 Thread Greg Barton
Well, approach this systematically, then: Create a new Drools project in Eclipse and replace the DroolsTest.java and Sample.drl with the ones I sent before. What results do you get? If they are correct, modify the project one step at a time until the problem is uncovered. One place to focus

[rules-users] Rulebase EventListener

2009-05-04 Thread sreenivas555
I am trying to add an event listener on adding a new rule / updating a rule. Following are the steps. Somehow the listener is not getting called. any help on this highly appreciable Step1: Create an instance of Extend DefaultRuleBaseEventListener and create an installce.

Re: [rules-users] Hibernate proxy objects equality tests failing in Drools 5

2009-05-04 Thread Gustavo Maia Neto
on this afternoon I will migrate to Drools 5 CR1, unfortunelly i'm not sure if it will solve my problem. Does anyone else uses Drools with objects that came from an hibernate, (proxies)? Also, i'm not using any proxy to fetch lazy data inside my Drools stateful session. thanks Guto escreveu: >

Re: [rules-users] listbox in DSL

2009-05-04 Thread Sreenivas Reddy
I want to know the possibility of displaying a listbox in BRMS? We can display combo box using DSL. I am expecting something like that..  Thanks Sreenivas From: Earnest Dyke To: Rules Users List Sent: Friday, 1 May, 2009 9:36:28 PM Subject: Re: [rules-users

RE: [rules-users] queries in Drools 5.0

2009-05-04 Thread Quinn, Dan
Mark, We were using JRockit's Mission Control to monitor memory. The working memory footprint just kept growing even though we were only querying working memory and weren't adding new facts. I'm new to the Mission Control application and couldn't figure out how to configure it to verify queries

Re: [rules-users] Rule problem

2009-05-04 Thread Femke De Backere
I'm using this: package bmi import bmi.DroolsTest.BMIClass; rule "Overgewicht" ruleflow-group "BMIrules" when bmiClass : BMIClass($bmi: bmi >= 25, bmi < 30) then System.out.println("U heeft overgewicht: " + $bmi); end rule "Obesitas"

Re: [rules-users] Rule problem

2009-05-04 Thread Wolfgang Laun
I cannot reproduce your findings. Which bmi values cause the firing of two rules? Are you using exactly the same .drl file Greg sent? -W 2009/5/4 Femke De Backere > Thanks for the answer! But I sometimes get 2 rules that are correct, and > that is impossible. I embedded Greg's DroolsTest class i

Re: [rules-users] Rule problem

2009-05-04 Thread Femke De Backere
Thanks for the answer! But I sometimes get 2 rules that are correct, and that is impossible. I embedded Greg's DroolsTest class in my class (I am doing some test on performance and studying the difference between performance with a plain java class), and it still doesn't work, and I really

Re: [rules-users] Debugging Drools when/then using breakpoints

2009-05-04 Thread Wolfgang Laun
There is no such thing as the "point in flow of control where a rule's 'when' is executed". It is the foremost purpose of the Rete algorithm to avoid these straightforward evaluations of the LHS conditions as rule programmers see them in the rule text. Instead, LHSides are taken apart (by the rule

[rules-users] Debugging Drools when/then using breakpoints

2009-05-04 Thread lightbulb432
(I can't use Eclipse's debug as "Drools Application" feature because the Drools application I'm using is embedded within a larger deployed web application, so I must use breakpoints.) Where can I set breakpoints in my IDE to know exactly when the when/then sides of a rule are evaluated? I know th