[rules-users] Some serious problems while authoring rules

2007-07-19 Thread Natraj Gudla
I am facing some serious blocking issues while writing few rules. In the rule below, a1, a2 are Double objects. When i have the first statement in the rule EMIAgainstProperty( obj : a1 ), the rule does not firewhen i comment and re phrase the second line as emi : EMIAgainstProperty( a2 = ( *

[rules-users] Hello Mark

2007-07-19 Thread Natraj Gudla
Mark, Have you released the final version of 4.0.0. Under the download page http://labs.jboss.com/jbossrules/downloads i see the MR3 listed. Thanks Natraj ___ rules-users mailing list rules-users@lists.jboss.org

Re: [rules-users] Some serious problems while authoring rules

2007-07-19 Thread Dr. Gernot Starke
Hi, please list your EMIAgainsProperty class... Gernot I am facing some serious blocking issues while writing few rules. In the rule below, a1, a2 are Double objects. When i have the first statement in the rule EMIAgainstProperty( obj : a1 ), the rule does not firewhen i comment and

Re: [rules-users] custom rule creation/parsing

2007-07-19 Thread Eugeny N Dzhurinsky
On Mon, Jul 16, 2007 at 05:03:28PM +0100, Mark Proctor wrote: descr's cover the full range of the drl language. I recommend you parse some drl files into descrs, and look at the creates AST with your debugger. Okay, I took some simple example from Drools examples (HelloWorldExample)

[rules-users] org.drools.common.RuleFlowGroupNode

2007-07-19 Thread hypnosat7
When I fire my rules with a giving rule flow I have this exception : java.lang.ClassCastException: org.drools.common.RuleFlowGroupNode cannot be cast to org.drools.spi.Activation at org.drools.ruleflow.instance.impl.RuleFlowSplitInstanceImpl.trigger(RuleFlowSplitInstanceImpl.java:90)

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

2007-07-19 Thread Fernando Meyer
It seems to be a bug, please could you open a Ticket in jira and provide additional information for that? Thanks Fernando Meyer http://fmeyer.org [EMAIL PROTECTED] PGP: 0xD804DDFB On Jul 18, 2007, at 9:16 AM, Jesse Stockall wrote: The NoClassDefFoundError exception is thrown from within

Re: [rules-users] JBossRules and JAVA Servlet / JSP

2007-07-19 Thread Natraj Gudla
You are getting an error at run time. Make sure you include all the required drools jars in your run time class path. THis will resolve the issue. If you are using an eclipse launch config, it is very easy to set the class path jars. You need to know that compile time libraries and run time

[rules-users] Modifying the fact more than once within a rule

2007-07-19 Thread Natraj Gudla
Hello All, Has anyone faced a situation where a fact gets modified more than once within a given DRL. The modification is required so that the other rules properly fire based on the consequence of the earlier. I am able to get through the modifyRetract() and modifyInsert() once in a rule

Re: [rules-users] JBossRules and JAVA Servlet / JSP

2007-07-19 Thread Mark Proctor
http://wiki.jboss.org/wiki/Wiki.jsp?page=RulesTomcat Mohammed JBossRules wrote: Hello, I'm a new user for JBossRules, and I'm feeling like turning around since a while, so i thought that sole body could help... I'm using JBossRules(V4.0.0.12865MR3) on eclipse (Version: 3.3.0 Build id:

Re: [rules-users] custom rule creation/parsing

2007-07-19 Thread Mark Proctor
Look ath te PackageBuilder src and the addFromDrl - you'll see there the first bit of code that builds the descr. Also look the DrlParserTest which parses code segments and checks the resulting descrs. Mark Eugeny N Dzhurinsky wrote: On Mon, Jul 16, 2007 at 05:03:28PM +0100, Mark Proctor

Re: [rules-users] Some serious problems while authoring rules

2007-07-19 Thread Mark Proctor
You do understand that what you have there is a cross product, you'll need two objects to match against that - were you expecting this to wokr against and on the same single EMIAgainstProperty object? Mark Natraj Gudla wrote: I am facing some serious blocking issues while writing few rules. In

Re: [rules-users] Proposal: Collect Case Studies

2007-07-19 Thread Mark Proctor
Someone has a subproject for a solver framework, see the taseree project at sourceforce, when it has matured it will become part of the main release in the drools-solver project directory. I'm sure Geoffrey would love any additional help. I already plan to extend this for Genetic Algorithms,

Re: [rules-users] Re: Entreprise using Drools with success

2007-07-19 Thread Mark Proctor
heh, can I quote this in my blog? Actually if people want to send me their findings, don't have to mention your employers I can do this anonymously, then I'll put them all up together on the blog :) Mark Matt Geis wrote: Not quite able to say who I work for, but we run a brokerage app for

Re: [rules-users] Proposal: Collect Case Studies

2007-07-19 Thread Mark Proctor
That would be fantastic, I'm useless at coming up with examples, I think that's true for most devs :) The wiki is open to all, and over time we can figure out how to better present the information - maybe even put it towards part of a book. I want to wait till the next release (end of this

Re: [rules-users] Using Rule Flow

2007-07-19 Thread Mark Proctor
I have just updated conways game of life example to use ruleflow, the agenda group one still exists. So execute ConwayAgendaGroupRun and ConwayRuleFlowGroupRun to run the two examples. AgendaGroupDelegate and RueFlowDelegate show the two different implementations. Mark Natraj Gudla wrote:

Re: [rules-users] JBossRules and JAVA Servlet / JSP

2007-07-19 Thread Mohammed JBossRules
hello, i've got it :); what i shoult import into my build path was not the core and compiler but all the set contained in the drools library, maybe that would help someone later here is the list of jars antlr-runtime.jar drools-compiler.jar drools-core.jar drools-decisiontables.jar

Re: [rules-users] Some serious problems while authoring rules

2007-07-19 Thread Mark Proctor
you have two patterns, there for you need two objects - it's a cross product. Try using an eval instead of a predicate, then you can bind all your variables on the first line, and eval them on the next line. Until you move to 4.0 there is no clean way to do this. Mark Natraj Gudla wrote: Yes,

Re: Re: [rules-users] JBossRules and JAVA Servlet / JSP

2007-07-19 Thread Mohammed JBossRules
hello, Thank you all for your replays; as you've suggested, what i should import into my build path was not the core and compiler but all the set contained in the drools library, maybe that would help someone later! here is the list of jars antlr-runtime.jar drools-compiler.jar drools-core.jar

Re: [rules-users] Using Rule Flow

2007-07-19 Thread Natraj Gudla
Mark, Did you place them at http://labs.jboss.com/jbossrules/downloads . I dont see them available here. Thanks Natraj On 7/19/07, Mark Proctor [EMAIL PROTECTED] wrote: I have just updated conways game of life example to use ruleflow, the agenda group one still exists. So execute

Re: Re: [rules-users] JBossRules and JAVA Servlet / JSP

2007-07-19 Thread Mohammed JBossRules
hello, Thank you all for your replays; as you've suggested, what i should import into my build path was not the core and compiler but all the set contained in the drools library, maybe that would help someone later! here is the list of jars antlr-runtime.jar drools-compiler.jar drools-core.jar

RE: [rules-users] Entreprise using Drools with success

2007-07-19 Thread Marcos Tengelmann
Hi, We are using Drools VERY succesfuly around 3 years (We started with version 2.x). And it has being so usefull that now we have a very big system running on more than one customer in telecom market. Main (Obvious) Advantages: 1-All open source and community envolvment benefits (Well tested

[rules-users] [resolved] JBossRules and JAVA Servlet / JSP

2007-07-19 Thread Mohammed JBossRules
HI, Thank you all for your replays; as you've suggested, what i should import into my build path was not the core and compiler but all the set contained in the drools library, maybe that would help someone later! here is the list of jars antlr-runtime.jar drools-compiler.jar drools-core.jar

[rules-users] Loading more than 10000 rules

2007-07-19 Thread Héron Nicolas
Hello, I am using drools 3.0.6 for a retail customer. We have the current problem that we can not add more than 1 rules. After this, the system increases its memory and runs out of memory. Is there a limit ? Thanks Nicolas Heron ___ rules-users

[rules-users] Accessing maps (hashmaps) keys and values in rules

2007-07-19 Thread Ryan, Dennis (Dennis)
We are using Maps (HashMaps) in our rules and the only way we have found to access keys and values in the Map in the when clauses is thru use on eval() which I know is a big no-no by rules purists. Is there a better way, maybe some shorthand I'm not familiar with to deal with Maps in the when

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

2007-07-19 Thread Chris West
Edson, I think I've discovered the problem. In the file Rete.java, in the method assertObject, there is a check for shadow proxy like below: Class cls = object.getClass(); if ( object instanceof ShadowProxy ) { cls = cls.getSuperclass(); } If

Re: [rules-users] Loading more than 10000 rules

2007-07-19 Thread Edson Tirelli
Heron, There is no hard limit on rules, but you may need indeed to tune jvm configuration to be able to handle such number of rules. Are you running out of permgen? What are your memory settings? In your use case, must all the 1 rules be in the same rulebase? Is it possible to

Re: [rules-users] drools-example-brms

2007-07-19 Thread Fernando Meyer
use double \ in your config. file ex. D:\\workspace2\\drools-example-brms\\cache Fernando Meyer http://fmeyer.org [EMAIL PROTECTED] PGP: 0xD804DDFB On Jul 19, 2007, at 9:31 AM, David Nogueras wrote: Hi, I´m trying to run the brms sample and i get the next output:

Re: [rules-users] Accessing maps (hashmaps) keys and values in rules

2007-07-19 Thread Edson Tirelli
Denis, If you are using latest build from trunk (I'm not sure it already works in MR3), you can use a simplified MVEL syntax: when Person( address[business].phone == ) then ... end Although, the above will be converted into an inline-eval. Not as bad as a top level eval,

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

2007-07-19 Thread Edson Tirelli
Chris, Right on the spot. I changed other references, but this one passed unnoticed. The correct is: Class cls = null; if ( object instanceof ShadowProxy ) { cls = ((ShadowProxy)object).getShadowedObject().getClass(); } else {

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

2007-07-19 Thread Chris West
Edson, Thanks for incorporating this fix. The good news is that it fixes that problem. The bad news for me is that I'm now experiencing a different problem (where my rules are not firing). I'll look into my new problem a little deeper. Thanks again. -Chris West On 7/19/07, Edson Tirelli

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

2007-07-19 Thread Edson Tirelli
Ouch! Is all that trouble a result of using JDK proxies in drools? If it is, I think it is the case of us developing a whole set of unit and integration tests for this specific scenario, since none of our tests are triggering errors... Thanks and please keep me posted of your progress or

Re: [rules-users] frequency of digest posts

2007-07-19 Thread lfleal
I just went no mail because of this. At least with Nabble, I just get one email per day :) Matt Geis wrote: 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

[rules-users] Predicate expression effect on performance

2007-07-19 Thread Yuri de Wit
What is the extent of the performance impact caused by using predicate expressions? Check( amount == $amount ) or Check( $amt : amount - (isSameAmount($amt, $amount) ) My understanding is that once asserted the amount property will be cached in the shadow fact, is the result of

Re: [rules-users] Modifying the fact more than once within a rule

2007-07-19 Thread Natraj Gudla
Hello Edson, It is the modifications in different rule consequences and not the single one. I have pasted the 4 rules which are involved here... My frist two rules are mutually exclusive as are the next two. When i execute, Calculate Business Profit,1 fires, followed by Calcualte AIC. As soon

Re: [rules-users] Loading more than 10000 rules

2007-07-19 Thread Michael Neale
If you see the error out of PermSpace you can increase perm space. Another strategy, is to build the rules, in chunks, say 1000 at a time, take the Package object, and *then* add it to the rulebase. That may make it easier. You will need more then the default space on the heap for this I would

Re: [rules-users] Predicate expression effect on performance

2007-07-19 Thread Michael Neale
In a sense, yes - but its the result of the comparison that is cached really. In the case you described, it is subrule generation. So either side of the or is like a separate rule. In version 3, the result of isSameAmount (ie if it was true or false) is cached. Things will only be re-checked if

Re: [rules-users] Predicate expression effect on performance

2007-07-19 Thread Yuri de Wit
(sorry, the OR was not part of the sample rule: I was just considering the same rule written in two different ways) I am seeing a considerable performance problem with my rules and I am trying to narrow down why. I have a small number or rules but hundreds of thousands of facts. At first the