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
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 hea
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
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
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 poi
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
To
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 helpful
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 [mailto:rules-users-boun...@li
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
>- 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
insi
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'
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 sprea
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.)
> I believe the answer is that Drools implements sub-rule compilation for
> rules conta
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
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 D
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"
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:
http://www.nabble.com/OR-op
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 lo
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 appropria
19 matches
Mail list logo