Looks like 5 rules with a global flag might work:
global boolean flag = false;
rule name1
when
(condition1 == true )
(flag == false)
then
consequence1();
flag = true;
end
...
rule name5
when
(condition5 == true )
(flag == false)
then
consequence5();
flag = true;
end
Does that work
Another change that occurred in parallel with the upgrade was responsible
for the upgrade. MY apologies for the false alarm.
I am now seeing a problem with Unable to load dialect ...
JavaDialectConfiguration - it appears to be looking for the Eclipse JDT jar
file. However, I have never required
Edson,
I wasn't clear. I am getting this dialect error when I run the app outside
Eclipse. It works great in Eclipse.
Scott
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
2009/5/29 Mark Proctor mproc...@codehaus.org
Scott Reed wrote:
Edson,
I wasn't clear. I am getting this dialect error when I run the app
outside Eclipse. It works great in Eclipse.
If you are outside of eclipse, then you need a compiler - either Janino or
JDT, it's always been that way
I just upgraded our app from Drools 4 to 5 libraries. We just use the
rules engine with DRL. The performance of the engine on our rulebase is
unacceptably slow. I assume there is something we need to do to our
rules or the way we are configuring the engine to fix this. I don't see
anything in
need a description of your use case: what
kind of rules do you use, how many rules, how many facts, etc.
Finally, we need a way to reproduce the problem.
So, if you can provide more info, we might be able to help.
[]s
Edson
2009/5/28 Scott Reed sr...@avacoda.com mailto:sr
Mark,
I'm sorry I was unable to participate in pre-release testing. I didn't
think we had an especially unusual application. It's under 100 rules
with some simple evals and moderate processing on the consequence side.
I'll try Ingomar's suggestion and get profiles and, if necessary, I'll
A RuleBase can contain many rules, not just one. Generally we take all
the rules we need for an application and we assemble them into one
rulebase, so we don't have to figure out which rulebase to use. Does
that help?
Nikhil_dev [3/13/2009 8:16 AM] wrote:
Perfect this is the situation but
I think it would be like this:
rule Test
when
$ca: CoApplicant()
$co: Contract()
eval ( $c1.getRelationship().equals(S) ||
$co.getState().equals(CO) ||
$co.getState().equals(IL) ))
You can add an instance of Integer or an extension of Integer, perhaps
a class called StateId, to working memory. Initially set it to1. Add a
condition to each rule to test if the StateId is equal to each rule's
order in the sequence. Add a statement to the action part of each rule
to
As I understand it, samd is asking how to test the cheese field (a collection,
apparently) of seller for null. I think he just wants:
$s: seller: ( cheese != null active == true )
cheese: ( type == chedder ) from $s.cheese
As Dave suggests, sam, it will help you a lot to spend some time
What is the problem you are seeing? Do the rules compile ok?
Otaduy del Paso, Zaloa [10/6/2008 12:08 PM] wrote:
Does anybody know the answer to my question? I'm not able to solve
this issue and don't find any clarifying tutorial either
Hi,
I'm new in drools and I'm having some
List
*Asunto:* Re: RV: [rules-users] Checking an xml field
Read the manual man. Your rules don't make any sense
http://downloads.jboss.com/drools/docs/4.0.7.19894.GA/html_single/
On Tue, Oct 7, 2008 at 9:49 AM, Scott Reed [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:
What is the problem
/4.0.7.19894.GA/html_single/
On Tue, Oct 7, 2008 at 9:49 AM, Scott Reed [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:
What is the problem you are seeing? Do the rules compile ok?
Otaduy del Paso, Zaloa [10/6/2008 12:08 PM] wrote:
Does anybody know the answer to my question? I'm not able to solve
Edson,
Is that session an instance of org.drools.spi.KnowledgeHelper?
Scott
Edson Tirelli [9/23/2008 10:50 AM] wrote:
Did you tried a shotgun? ;)
If that fails, maybe session.halt()?
[]s
Edson
2008/9/23 Руслан Сорокин [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
Hello
WorkingMemroy.halt() should kill drools, right?
Mark Proctor [9/23/2008 11:25 AM] wrote:
StatefulSession is an instance of ReteooStatefulSession which extends
the WorkingMemory interface. KnowledgeHelper is just a convienience
api that is available in the consequence.
Mark
Scott Reed wrote
I am trying out transparent persistence using
Db4oInstrumentationLauncher. I am getting a VerifyError Illegal type in
constant pool. Since I do not get these without the launcher I wonder
if there is something I missed in the docs about implementing this
feature. Any ideas or suggestions would
Oops, sorry. Wrong list.
Scott Reed wrote:
I am trying out transparent persistence using
Db4oInstrumentationLauncher. I am getting a VerifyError Illegal type
in constant pool. Since I do not get these without the launcher I
wonder if there is something I missed in the docs about implementing
Try a simple rule that just checks for any InputObject to make sure you
have the class imported correctly.
Rule x
when
InputObject()
then
end
thomas kukofka wrote:
Hello,
If have an input object Inputobject which contains an enum Parameter which
contains all allowed parameters of
of Parameter it works again:
private HashMapString, String stringParameters;
/ io: InputObject ( stringParameters[somestring] ==/ /something) /
Thomas
*Scott Reed*
sreed at avacoda.com
mailto:rules-users%40lists.jboss.org?Subject=%5Brules-users%5D%20enumsIn-Reply
*Try this:
*
*rule* Your First Rule
*when*
$d1 : Date1( $end1: endDate )
$d2 : Date2()
$d2 : Date2( beginDate $end1 )
*then*
#actions
System.out.println(do something);
*end*
Costello, Robert wrote:
I'm having a hard time
Oops, try this:
*rule* Your First Rule
*when*
Date1( $end1: endDate )
Date2( beginDate $end1 )
*then*
#actions
System.out.println(do something);
*end*
Scott Reed wrote:
*Try this:
*
*rule* Your First Rule
*when
1) Finding all the duplicate pairs is causing combinatorial explosion.
With 3 objects the rule will compare every object against every
other object which requires running the run about 450 MILLION times. If
you must discover every pair that is a duplicate, then I think you have
a hard
I forgot the updates and added a couple of $'s (see below).
Scott Reed wrote:
1) Finding all the duplicate pairs is causing combinatorial explosion.
With 3 objects the rule will compare every object against every
other object which requires running the run about 450 MILLION times.
If you
Can you verify that you are not running a compiled version of the old
rules (perhaps by adding System.out.println(New version); to the LHS
in the new rules)?
Keith Bennett wrote:
Does anyone have any idea why drools.getRule().getName() inside of the
rule consequence would be returning the old
couldn't post it in public.
Scott
Edson Tirelli's message received 4/10/2008 8:03 AM:
Can you provide a self contained test to reproduce the problem and
attach it to a JIRA? I will fix it.
Thanks
[]s
Edson
2008/4/9 Scott Reed [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]:
I
2008/4/8 Scott Reed [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]:
Sorry, the NPE is in ReteTuple.get(Declaration)
Scott Reed's message received 4/8/2008 7:38 PM:
Running Drools 4.0.3, on Win 2k sp4, JDK 1.6.0_03.
I am getting this exception after the debugger shows
and you are not able to test before the release, it
will have to wait 4.0.8. http://4.0.8.
All you need to build drools is java, maven and ant. Can you set
this up?
[]s
Edson
2008/4/9 Scott Reed [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]:
Glad to hear that. However, I am not set
will be released as 4.0.7, and if your specific
problem is fixed and you are not able to test before the release, it
will have to wait 4.0.8. http://4.0.8.
All you need to build drools is java, maven and ant. Can you set
this up?
[]s
Edson
2008/4/9 Scott Reed [EMAIL PROTECTED] mailto:[EMAIL
Edson
2008/4/9 Scott Reed [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]:
I built it but can only find the core jar file, nothing for the
compiler. With just the core jar replaced, I still get the NPE.
Edson Tirelli's message received 4/9/2008 2:24 PM:
Nope, only source code
option I mentioned in my other e-mail.
[]s
Edson
2008/4/9 Scott Reed [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]:
I think the compiler jar failed to build perhaps due to the error?
Edson Tirelli's message received 4/9/2008 6:14 PM:
After the build, you can find the jars
Of *Scott Reed
*Sent:* Wednesday, March 05, 2008 8:40 PM
*To:* Rules Users List
*Subject:* Re: [rules-users] Setting date during execution of rules.
As I understand it, the problem is that you have legacy code that uses
the system date in it's calculations and you cannot fix that so
That's a lot to expect from a clean API. The RuleBase has Packages, not
Rules. Methods concerning rules are found in the Package class.
It's easy enough to roll your own. perhaps something like
public ListStringgetRuleNames( RuleBase rulebase )
{
ListString ruleNamess = new ArrayListString();
As I understand it, the problem is that you have legacy code that uses
the system date in it's calculations and you cannot fix that so it will
take a date parameter, right? If so, then my recommendation is to fix
the legacy software if possible since messing with the system date gives
me the
Here's how I'd address this issue. I haven't compiled or run this but I
hope it communicates the idea.
rule Every mother and father produce a child
no-loop
when
$mother : Mother( )
$father : Father( )
not Child( mother = $mother,
While I am not a Drools expert, I know it's helpful to start with the
objects that the rules will work with.
I do not see why you would need one rule to call another or to inherit
from another.
Have you reviewed the examples to see how Drools works?
anandhakrishnan's message received 2/21/2008
Your description of the task did not include a priority field. Where
does priority enter into this?
As I suggested earlier, it helps to have a good object model for your
domain before being too concerned about the rules. The model may need to
be modified to fit a rule system, but it's difficult
.
Scott Reed-3 wrote:
Your description of the task did not include a priority field. Where
does priority enter into this?
As I suggested earlier, it helps to have a good object model for your
domain before being too concerned about the rules. The model may need to
be modified
Basically, the answer is no. Perhaps if you explained what you are
trying to accomplish, someone here could help you out.
anandhakrishnan's message received 2/20/2008 7:04 AM:
Hi All,
I am using Drools 4.0.4.
consider i have
rule1
rule2
rule3
My Question,
is it possible to call rule3
Inserting a fact into Drools' working memory makes it available to the drools engine. I don't think
working memory is designed to store your data for your use after the rule engine completes. I think
you should employ a parallel mechanism to record your new data so you can access it outside of
Mark Proctor's message received 10/18/2007 12:07 PM:
Manukyan, Sergey wrote:
Kris,
It looks like whatever name I choose for *RuleNameEqualsAgendaFilter –
*it doesn’t fire any rules. It may be the name of my rule I want to
fire or some bogus name, just the fact that I am using it – make
. Starke's evaluation, the result of the Drools Puzzle #2
is out. Congratulations to the winner Scott Reed, it's your turn to
post the puzzle for round 3. We will publish the evaluation text very
soon.
___
rules-users mailing list
rules-users
Mark Proctor's message received 10/3/2007 12:28 PM:
Scott Reed wrote:
Please tell me how I can call a function on the LHS.
(hurry my assignment is due today!)
Is that not covered by #2, it's more of an example for #2?
Actually I thought I was being funny about #11 and threw in the bit about
You didn't even bother to read the thread you interrupted here, did you Sergey?
Manukyan, Sergey's message received 10/3/2007 1:29 PM:
Folks,
Where can I find information on how to pre-compile rules in 4.0.1?
Thanks,
-Sergey
___
rules-users
1) I do not think you can use functions on the LHS (the then part).
2) Even if it were allowed, I don't see a return type for the controllo(String
a).
Maybe if you explained what the rule was supposed to be doing we could be more
help.
___
Maybe each row needs it's own list? I suppose that may require a separate RHS
column for each row.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
Edson Tirelli's message received 8/31/2007 7:08 AM:
Did you updated your MVEL jar? Are you trying to deserialize a
binary previously compiled rulebase or are you trying to load source DRLs?
Loading source DRLs. I thought I had copied in the new MVEL jar but hadn't. It works fine now that
] wrote:
Salience salience = new SalienceInteger( Integer.parseInt( salienceText ) );
rule.setSalience( salience );
Cheers,
manjax23
Scott Reed-4 wrote:
My 3.1 app has a mechanism that allowed the user to change the salience of
some rules before running
them, before loading up WorkingMemory
Thanks, but I want to know how to find out the salience of a Rule object that has been already
parsed from DRL.
Manjax23's message received 8/17/2007 1:44 AM:
Salience salience = new SalienceInteger( Integer.parseInt( salienceText ) );
rule.setSalience( salience );
Cheers,
manjax23
Scott
I have converted my 3.1 DRL to 4.0, think I have the dependencies worked out (removed
antlr-30ea8.jar) and now I am getting a cryptic error message from the DRL compiler:
Rules.getRuleBase. [EMAIL PROTECTED]
org.drools.rule.InvalidRulePackage: [EMAIL PROTECTED]
at
1) Please tell me where I can find the definitive list of dependencies for the
4.0 release.
The manual lists them but also says to look for README_DEPENDENCIES.txt in the lib dir but I do not
see it.
I am getting the following error:
Exception in thread main java.lang.NoSuchMethodError:
It appears that the plugin is not recompiling the file when I edit it, but it says it is Unable to
parse rules to build Rete tree if I select that view.
I could really use some help here.
Shouldn't the compiler be telling mere where the syntax errors are?
Scott Reed's message received
= new SalienceInteger( Integer.parseInt(
salienceText ) );
rule.setSalience( salience );
Cheers,
manjax23
Scott Reed-4 wrote:
My 3.1 app has a mechanism that allowed the user to change the
salience of
some rules before running them, before loading up WorkingMemory. This
was quite simple
at the
SalienceInteger to understand how it works, tuple, workingMemory are
ignored for non dynamic environments:
http://anonsvn.labs.jboss.com/labs/jbossrules/trunk/drools-core/src/main/java/org/drools/base/SalienceInteger.java
Mark
Scott Reed wrote:
For lack of any better suggestion I am getting the int
I am not getting notified of compiler errors in the Rule Editor, only when I execute the rule
engine. I am running Eclipse 3.2 and Drools plugin 4.0.0. Any ideas what might be wrong or is this
how it works now?
___
rules-users mailing list
Scott Reed's message received 8/17/2007 8:55 PM:
I am not getting notified of compiler errors in the Rule Editor, only
when I execute the rule engine. I am running Eclipse 3.2 and Drools
plugin 4.0.0. Any ideas what might be wrong or is this how it works now?
My 3.1 app has a mechanism that allowed the user to change the salience of some rules before running
them, before loading up WorkingMemory. This was quite simple, rule.getSalience() returned a rule's
int salience value and rule.setSalience(int) set it. Now in 4.0 I see salience is no longer just
=4.0.0.GAEnhancementsList
2007/8/14, Scott Reed [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]:
I looked around the web site and don't see where there is an
announcement or release schedule for
the final release of 4.0. Please tell me where I can track Drools
release status on the web
I looked around the web site and don't see where there is an announcement or release schedule for
the final release of 4.0. Please tell me where I can track Drools release status on the web site.
Thanks,
Scott
___
rules-users mailing list
Matthew Shaw's message received 5/29/2007 9:39 PM:
ok point taken. I have modified my rule so that it looks at an object
and I modify a property on that object instead as follows: But still the
same issue.
* *
*rule* sum higher rate totals
*salience* 970
*no-loop* *true*
*when*
Unless I never looked at the name except in the source code, I don't see the much point in having
two names that can be distinguished (due to hashcode inclusion) but have been semantically
disconnected from the source code rules. If an error occurs in one of those rules, how will you know
which
Kranthi,
There are two options that make it easier for non-programmers to understand, modify and write new
rules. One is Decision Tables and the other is DSL (Domain Specific Language which allows you to
develop a more natural syntax and offer rule templates for non-programmers to fill in). DSL
Check the Drools documentation section 6.2.2.1. Globals.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
fakhfakh ismail's message received 5/14/2007 3:48 PM:
Hello,
first sorry for my bad english.
I want to declare a variable of type List
rule userrole
when
$user1: User (userid1: userId)
$user2: User (userId == userid1)
then
List L = new ArrayList();
if
Anstis, Michael (M.)'s message received 4/13/2007 6:20 AM:
You need to change your rule:-
rule userrole
when
user1: BnUserValue(name : name, creationDate : creationDate)
and
ActiviteOut : BnNodeValue( BnRole: *_b_*nRole )
and
lien: BnEdgeValue(id : id)
then
I believe you failed to import SinglePart.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
Krunoslav Sabljak's message received 4/7/2007 5:49 PM:
Can u be more specific?
As u can see, there are no imports for processMulipart() and
singlePart() methods.
In order to call one drl function in another u need to access it through
static call from a class that has very same name. I've got
Thank you, Tom.
I replaced antlr-2.7.6 with 2.7.7 and antlr 3.0ea8 with the 3.0b5 that
came with the Drools 3.1M1 release.
I upgraded stringtemplate to 3.0.
None of these changes helped which is not too surprising since the error
is in the commons-jci code:
Exception in thread main
Never mind. I forgot to install GEF when I upgraded Eclipse.
S Reed's message received 3/14/2007 2:53 PM:
I have copied org.drools.ide_3.1.0.1.jar into my eclipse plugins
directory and restarted eclipse. My drl files are not syntax colored,
I do not see the JBoss Rules icon in the toolbar and
69 matches
Mail list logo