RE: [rules-users] HelloWorld Example for drools4MR3

2007-07-12 Thread Anstis, Michael \(M.\)
Hi Joshua, You *should* be able to change assertObject(...) to simply insert(...). I am sure examples will be updated at some stage (I know the JBoss Drools team always welcome community support). With kind regards, Mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL

[rules-users] Rule compilation errors under heavy load

2007-07-12 Thread Dean Jones
Hello folks, I'm experiencing some odd behaviour from Drools (or maybe the Eclipse compiler) when load-testing my application, and wondered if anyone else had experienced the same issue. I have a web service which, for every request, loads in rules from the database, creates a

[rules-users] Can't execute rules twice with a second classloader

2007-07-12 Thread Aaron Dixon
I am trying to sequentially perform two rules executions using two different classloaders in the same VM. I create completely new state for each execution, yet I still fail on the second execution. I believe this has to do with some internal static cached state that JBossRules is maintaining. A

Re: [rules-users] Rule compilation errors under heavy load

2007-07-12 Thread Edson Tirelli
Is it possible for you to provide a test case capable of reproducing the problem? At the same time, I would suggest you to not follow such approach in your application. Compilation is an extremely heavy process and should not be done for each request. The ideal approach is to pre-compile

Re: [rules-users] NullPointerException while deleting the rule package

2007-07-12 Thread Edson Tirelli
This problem was supposed to be fixed in MR3. Can you please provide a self contained test and attach it to a JIRA so I can investigate and fix? Thank you, Edson 2007/7/12, Sarika Khamitkar [EMAIL PROTECTED]: This is the again regarding the NullPointerException issue. Sorry for

Re: [rules-users] Rule compilation errors under heavy load

2007-07-12 Thread Dean Jones
Hi Edson, On 7/12/07, Edson Tirelli [EMAIL PROTECTED] wrote: Is it possible for you to provide a test case capable of reproducing the problem? I've written a quick test case, which is attached. When numberOfThreads==1, everything compiles okay. When numberOfThreads==100, I get function

[rules-users] Examples moving

2007-07-12 Thread Fernando Meyer
Hi peeps, Just to be consistence, the drools-example directory now contains examples projects and not an eclipse project anymore: trunk -drools-examples -drools-examples-drl -drools-examples-brms -drools-examples-*

[rules-users] how to create local variable

2007-07-12 Thread Manukyan, Sergey
Folks, I have a rule where I am repeating part of it twice : ($cs.getSuppCode().substring(4, 6)), and I would like to replace it with variable... how can I do that? The solution with in doesn't worl because it is a java code needed to perform calculations for variable. Please see the

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

2007-07-12 Thread Chris West
OK, I just solved my own problem. My proxy had no package, since the jdk based proxy is only in a package if it has at least 1 non public interface, according to the javadoc. The suspect code beginning on line 333 is: String pkgName = cls.getPackage().getName(); if (

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

2007-07-12 Thread Edson Tirelli
Chris, It seems like a bug to me. May I ask you please to open a JIRA and attach your project? We are trying to fix final bugs for MR4 and keeping all of them in JIRA will avoid us to miss anyone... Thanks []s Edson 2007/7/12, Chris West [EMAIL PROTECTED]: Hello, I'm trying to

Re: [rules-users] how to create local variable

2007-07-12 Thread Edson Tirelli
It is not possible to assign the result of an arbitrary method call to a variable right now. So, your best option is probably to do (please note the use of inline-eval): *rule* SupplierView: Headquarter Supplier Code should end on 25 or 30. *when* $cs :

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

2007-07-12 Thread Edson Tirelli
Please! Thank you for providing the solution. []s Edson 2007/7/12, Chris West [EMAIL PROTECTED]: OK, I just solved my own problem. My proxy had no package, since the jdk based proxy is only in a package if it has at least 1 non public interface, according to the javadoc. The

RE: [rules-users] how to create local variable

2007-07-12 Thread Manukyan, Sergey
Thank you Edson, I liked the solution with matches, it is much cleaner -Sergey From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Edson Tirelli Sent: Thursday, July 12, 2007 4:19 PM To: Rules Users List Subject: Re: [rules-users]

[rules-users] Compilation Error in Drools

2007-07-12 Thread McShiv
Hi All, I used the following code in the dsl file. DSL: [when] Check whether the name is present as {studName} = $stud : Student(name = {studName}); [then] Set the Error Code {errorCode} = String string = $stud.getName(); Error(errorCode, string); DRL: package com.policy;

Re: [rules-users] Complex validation logic for hierarchies with Drools

2007-07-12 Thread Edson Tirelli
Oleg, As I mentioned to you, it is perfectly fine and easy to use the rules engine to validate your object tree as long as you instruct your users that they must write structured rules. What I mean is: as much as DSL templates allow you to write rules that resemble natural language, it is

Re: [rules-users] Compilation Error in Drools

2007-07-12 Thread Edson Tirelli
Best way to investigate this is to expand your DSL to the DRL to check how the expansion is working. DrlParser parser = new DrlParser(); String expanded = parser.getExpandedDRL( drlSourceString, dslReader ); Check what is wrong in the expanded DRL. I see your map has an error:

[rules-users] Problem opening several views in 4.0 MR3 Eclipse

2007-07-12 Thread Eric Miles
When I attempt to open several views (Working Memory, Agenda, Global, etc) within an JBoss Rules enabled Eclipse, I receive the following error: java.lang.NoClassDefFoundError: org/eclipse/debug/internal/ui/contexts/provisional/IDebugContextListener at