Re: [rules-users] NoClassDefFoundError for BaseObjectClassFieldExtractor when running in Tomcat

2007-07-17 Thread Fernando Meyer
You should add the drools-core library as a required dependency. Fernando Meyer http://fmeyer.org [EMAIL PROTECTED] PGP: 0xD804DDFB On Jul 17, 2007, at 9:55 AM, Jesse Stockall wrote: Tomcat 5.5 Java 1.5 jbossrules-4.0.0.12865MR3 I have an instance of Drools running inside a webapp deployed

Re: [rules-users] The effect of not using shadow facts

2007-07-17 Thread Edson Tirelli
Chris, I found and developed an intermediate solution that shall work for your proxies. If it is not possible to create a shadow fact for a class that is asserted (because the class is final or whatever), the engine goes up in the class hierarchy, looking for a class or interface for which

Ответ: Re: [rules-users] Re: Using JDK d ynamic proxies as facts

2007-07-17 Thread Oleg Yavorsky
Ronald, I use Ant task too but in my usecase I'd like to add additional property to objects on a fly (actually collection of parents) so I can check it on a LHS. Currently I use eval on external objects (identity map with child and associated parents). I don't know yet if this approach viable a

Re: [rules-users] The effect of not using shadow facts

2007-07-17 Thread Chris West
Is that still true if the equals() and hashcode() methods are only based on the identity fields of the object (which cannot change)? -Chris West On 7/17/07, Mark Proctor <[EMAIL PROTECTED]> wrote: you only need to use modifyRetract if the object is inserted. The reason for this is if you chan

Re: [rules-users] The effect of not using shadow facts

2007-07-17 Thread Mark Proctor
you only need to use modifyRetract if the object is inserted. The reason for this is if you change field values on your facts we will not be able to remove them from our various internal hashmaps; thus the need to remove first prior to any changes, then make the changes and then insert it again

RE: [rules-users] "ShadowProxy"

2007-07-17 Thread Manukyan, Sergey
Edson, The problem is for example: I have a classes that I use with persistance broker (OJB) class Parent { private Child child; public Child getChild() { OJBBeanManager.retrieveReferenceIfNull(this,"child"); return child; } }

[rules-users] frequency of digest posts

2007-07-17 Thread Matt Geis
Why is it that the "digest" comes almost as frequently as individual emails? I've received eight separate digest emails in the last five hours, and I can only assume I'll get another ten or so by the end of the day? I subscribe because I like to keep up on what's going on with JBoss Rules, but

Re: [rules-users] The effect of not using shadow facts

2007-07-17 Thread Chris West
Not quite. It's really the opposite. There is a change I want the engine to see now, but my own code has not propagated the real change back around to the rule engine just yet. If I don't use my own proxy to hold the new value, then other rules will fire that I don't want. If I use my proxy, I

Re: [rules-users] The effect of not using shadow facts

2007-07-17 Thread Edson Tirelli
Chris, I'm not sure I understood your scenario bellow, but it does seem exactly what shadow facts do: a lazy proxy. In other words, lets say you have an object X. You assert X into working memory and the engine creates a shadow proxy for it. Then, you can mess with it as much as you want fr

Re: [rules-users] Re: Using JDK dynamic proxies as facts

2007-07-17 Thread Ronald R. DiFrango
Oleg, Are you generating the Castor classes on the fly? I am successfully using Castor generated classes within the rules engine without any proxy classes. My process is that I use the Castor ant task to generate objects based upon my schema. I then develop my rules against the Castor generated

Re: [rules-users] The effect of not using shadow facts

2007-07-17 Thread Chris West
Mark, Using modifyRetract and modifyInsert seems to fix the problem (at least in my test case I finally created). I'll try this on my real code. My only concern here is that it puts the burden on the rule author to know whether things are being shadowed or not. For shadowing that is explicitly

Re: [rules-users] Re: Using JDK dynamic proxies as facts

2007-07-17 Thread Oleg Yavorsky
Chris, I'll try to dig it a little too. My problem is that I need to proxy concrete classes as they are generated from XSD using Castor. If I find workaround I'll let you know. Oleg. Chris West <[EMAIL PROTECTED]> wrote: Oleg, So far I have not been successful. I've just posted my thoughts t

Re: [rules-users] The effect of not using shadow facts

2007-07-17 Thread Chris West
Thank you for your response to this issue. My use case for using proxies is this: The facts are not modifiable directly (no setter methods) or synchronously. Modifications to facts occur by calling another method which modifies the fact and notifies the rules engine of the modification asynchron

Re: [rules-users] The effect of not using shadow facts

2007-07-17 Thread Mark Proctor
If you do not have shadow facts you cannot use the update() method, it will leave the working memory corrupted. Instead you must manage this yourself, before you change any values on the object you must call modifyRetract() and after you hvae finished your changes ot hte object call modifyInser

Re: [rules-users] The effect of not using shadow facts

2007-07-17 Thread Edson Tirelli
Chris, Unfortunately, that is true. Shadow facts exist to ensure the rules engine integrity. At this point, there is no alternative to shadow facts, because the solution we used in 3.x had too many drawbacks and did not scaled for complex rules. We are trying to come up with an alternative

Re: [rules-users] "ShadowProxy"

2007-07-17 Thread Edson Tirelli
Sergey, ShadowProxy classes are not supposed to be visible outside the engine. What problem are you facing? []s Edson 2007/7/17, Manukyan, Sergey <[EMAIL PROTECTED]>: Folks, I am using MR3, my classes are being shadowed and I have something like "ShadowProxy" … I need to avoid tha

Re: [rules-users] Re: Using JDK dynamic proxies as facts

2007-07-17 Thread Chris West
Oleg, So far I have not been successful. I've just posted my thoughts to this list (under the subject "The effect of not using shadow facts"). Concerning the class names, my rules only match on an interface type implemented by the proxies, so the actual class type of the instance does not matte

[rules-users] The effect of not using shadow facts

2007-07-17 Thread Chris West
Hello, With prior versions of JBoss Rules (3.0.5) I have been using JDK generated dynamic proxies as facts, and they have been working fine. However, after upgrading to JBoss Rules 4.0.0MR3, I cannot seem to get the dynamic proxies to work as facts. It seems that even though a rule fires that c

[rules-users] "ShadowProxy"

2007-07-17 Thread Manukyan, Sergey
Folks, I am using MR3, my classes are being shadowed and I have something like "ShadowProxy" ... I need to avoid that as my logic depends on class name, so I just need to disable shadowing right? How can I do that? Thanks, -Sergey ** ** LEGAL DISCLAIMER **

Re: [rules-users] "Unable to load dialect"

2007-07-17 Thread Edson Tirelli
Sergey This was indeed a bug that I already solved in MR4. If you get latest successful build you shall not have the problem: http://cruisecontrol.jboss.com/cc/artifacts/jboss-rules Thanks, Edson 2007/7/17, Manukyan, Sergey <[EMAIL PROTECTED]>: Ok, just before I submit to JIRA, I

Re: [rules-users] 4.0 JBoss Rules IDE - JDK 1.4 compiler setting

2007-07-17 Thread Ronald R. DiFrango
Kris, I set the compiler compliance to 5.0, but the generated classes to 1.4. The only catch is that I also have to set the Source compatibility to 1.4 as well. Hence the error still occurs. Ron On 7/16/07, Kris Verlaenen <[EMAIL PROTECTED]> wrote: Ronald, Could you try not setting the com

Re: [rules-users] 4.0 JBoss Rules IDE - JDK 1.4 compiler setting

2007-07-17 Thread Ronald R. DiFrango
Kris, I think I just realized that JBoss rules IDE is NOT compatible with Eclipse Europa and hence the strange behavior. That would explain some of this. On 7/17/07, Ronald R. DiFrango <[EMAIL PROTECTED]> wrote: Kris, I set the compiler compliance to 5.0, but the generated classes to 1.4. Th

RE: [rules-users] "Unable to load dialect"

2007-07-17 Thread Manukyan, Sergey
Ok, just before I submit to JIRA, I want to make sure I have a "case". So I am using MR3. The exception is thrown when "for" cycle is used with local variable declared inside: rule "" when ... then for(int i = 1;;){break;} end it worked fine wh

[rules-users] NoClassDefFoundError for BaseObjectClassFieldExtractor when running in Tomcat

2007-07-17 Thread Jesse Stockall
Tomcat 5.5 Java 1.5 jbossrules-4.0.0.12865MR3 I have an instance of Drools running inside a webapp deployed on Tomcat. The rules have been compiled ahead of time and are loaded in with: InputStream is = PolicyRuntime.class.getResourceAsStream(name); DroolsObjectInputStream in = new DroolsObjectIn

Re: [rules-users] Having an else part

2007-07-17 Thread Mark Proctor
we currently recommend that you figure out the specific rules for that else part, and write them seperately. Mark Natraj Gudla wrote: When writing a rule, how do i deal with a scenario to do an action when a condition is not true. If i have a business need like IF COND1 is true DO Action1

[rules-users] Having an else part

2007-07-17 Thread Natraj Gudla
When writing a rule, how do i deal with a scenario to do an action when a condition is not true. If i have a business need like IF COND1 is true DO Action1 ELSE DO Action 2 I feel with drools we only check for the condition in when part and incase it fails, we dont have a way to call another