Re: [rules-users] Problem with modify sentence

2009-06-08 Thread Kevin Alonso
Hi Luis, The whole error message is the following: BuildError: Unable to build expression for 'consequence': Failed to compile: 1 compilation error(s): - (1,16) unqualified type in strict mode for: - 'modify ( rules ) { allowedGuesses -= 1 } System.out.println( Write a

[rules-users] Rules storage in a database

2009-06-08 Thread Bhamidi, Krishna
Hello, we have stored rules in a database, and require to migrate the rules from say a development database to a test database, and further to a production database and use Guvnor for analysts to view current rules in the production database. Has anyone attempted this, and is there an

Re: [rules-users] ResourceChangeNotifier and subscribeResourceChangeListener()

2009-06-08 Thread Jaroslaw Kijanowski
Hi, maybe this helps: http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-expert/html_single/index.html#d0e1123 Resource scanning is not on by default, it's a service and must be started, and the same is true for notification. Both can be done via the ResourceFactory. Have a

Re: [rules-users] OR operator affects how many times Rule's action is executed

2009-06-08 Thread sergey.olifirenko
More simple example: package continuated_rules dialect mvel rule fire_twice no-loop true when eval(true) or eval(true) then System.out.println(word); end output is: word word why does it happens ? -- View this message in context:

RE: [rules-users] OR operator affects how many times Rule's actionis executed

2009-06-08 Thread Anstis, Michael (M.)
I believe the answer is that Drools implements sub-rule compilation for rules containing or. So in essence your rulebase contains the following once compiled:- rule fire_twice_a no-loop true when eval(true) then System.out.println(word); end rule fire_twice_b

[rules-users] Timestamp for processing Historical Data

2009-06-08 Thread PriyaSha
Hi, I had a chance to go through the fusion sample. I tried the same example with another logfile as input Input: 1000 critical Symantec 5000 critical Symantec 6000 critical Symantec Here I set the timestamp as ( some date in the past + first column of the input). * Following is the simple

[rules-users] Re: Timestamp for processing Historical Data

2009-06-08 Thread Edson Tirelli
I can't say for sure that the results are right or wrong, because when time is involved, a lot of things must be taken in consideration. So, assuming you are using the fusion example as is, with the only difference that you are using your input/rules, meaning specifically that you are using the

Re: [rules-users] OR operator affects how many times Rule's actionis executed

2009-06-08 Thread Edson Tirelli
Correct. This is explained in the manual. All production rules rete-based engines work like this, executing the rule consequence once for each logical branch. []s Edson 2009/6/8 Anstis, Michael (M.) manst...@ford.com I believe the answer is that Drools implements sub-rule compilation

[rules-users] Templates / Generated rules debugging

2009-06-08 Thread Malenfant, Andre
Hi, Can some of your share your technique for debugging/troubleshooting rules: Here is the situation: - I have a web application that uses rules at specific points. - I use templates and decision tables so the actual rules are compiled by my application using a

[rules-users] Strange situation when defining arrays in Drools 5

2009-06-08 Thread Luis Silva
Last friday, I had the next situation. In drools 4.0.7 I had the expression: new double[]{-1, 1} And it worked. But in Drools 5.0 I had to erase the blank space (before 1 and after ,), because I was getting a warning message, during knowledge base building : line 29:114 extraneous input '1'

Re: [rules-users] Templates / Generated rules debugging

2009-06-08 Thread Ingomar Otter
- Since this is a web application, I cannot debug the rules in Eclipse (unless I am missing something) You are missing something. :-) That's possible. However we have found regular debuggers not to helpful. Have a look at the WorkingMemoryLoggers, they can give you a detailed

RE: [rules-users] Templates / Generated rules debugging

2009-06-08 Thread Malenfant, Andre
Is it possible to see the generated Java code for the rules? -Original Message- From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Ingomar Otter Sent: Monday, June 08, 2009 12:00 PM To: Rules Users List Subject: Re: [rules-users] Templates

Re: [rules-users] Templates / Generated rules debugging

2009-06-08 Thread Ingomar Otter
Yes, check this out: http://blog.athico.com/2008/02/looking-under-drools-skirt.html Am 08.06.2009 um 18:34 schrieb Malenfant, Andre: Is it possible to see the generated Java code for the rules? -Original Message- From: rules-users-boun...@lists.jboss.org

Re: [rules-users] Templates / Generated rules debugging

2009-06-08 Thread Edson Tirelli
Yes, check the PackageBuilderConfiguration class for the method setDumpDir(). Please note that drools generates and compile files in memory, so after you stop debugging, remember to turn this option off again to not consume unnecessary IO time. Also, the java code is usually not much

RE: [rules-users] Templates / Generated rules debugging

2009-06-08 Thread Malenfant, Andre
Perfect! B.T.W. I realized I can debug if I have drools sources and add a breakpoint at a strategic spot... Thanks -Original Message- From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Ingomar Otter Sent: Monday, June 08, 2009 12:47 PM

Re: [rules-users] Weighted rules / scoring

2009-06-08 Thread Chris Strachan
Hi, Don't think I intended to create a new instance, just modify the one matched in the rule. The following seems to have got it working. rule Myscoreincreaserule dialect mvel when a : Applicant( name == chris ) then a.setScore( a.score + 2 ); end Thanks for pointing

Re: [rules-users] Weighted rules / scoring

2009-06-08 Thread Sarish Jain
I think your issue is resolved Chris, but just curious would putting the rule like below make it more efficient? rule Myscoreincreaserule dialect mvel when a : Applicant( name == chris,$score:score ) then a.setScore( $score + 2 ); end --Sarish Shoot for the moon. Even if you

RE: [rules-users] Timer does not return!

2009-06-08 Thread Ajay.Gautam
Thanks for the sample code Kris. It seems that the problem is not with the Timer itself, but with WorkItemHadler ! (Complete code - extended version of your code - is attached). Adding a Log work item between START and the first Action breaks the code. If I remove the Log item, the flow works

[rules-users] Globals in ruleflow

2009-06-08 Thread Malenfant, Andre
I am experimenting with rule flows and I get the following error: Unexpected global [myglobal] When calling setGlobal on the session. This code works without the workflow (globals declared in the drl) but fails when I include the rule flow. I declared the same globals in the rule flow in the

Re: [rules-users] Weighted rules / scoring

2009-06-08 Thread Greg Barton
Don't forget that if you want other rules to react to the changed score you must call update() on the altered object: rule Myscoreincreaserule dialect mvel when a : Applicant( name == chris) then a.setScore( a.score + 2 ); update( a ); end --- On Mon,