---------- Forwarded message ----------
From: Ronald R. DiFrango <ron.difrango(a)gmail.com>
Date: May 24, 2007 10:48 AM
Subject: More Fun with JBoss Rules IDE and JBoss Rules in general
I am now getting the following error:
The type Rule_RNR_Qty____RNR_Adjustment_Qty___100__Tolerance_0 is already
rtv.drl line 758 1180017847586 29221
But I do not have this defined twice, well at least not in my mind. Here
are the two rule names that are conflicting:
"RNR Qty == RNR Adjustment Qty : 100% Tolerance"
"RNR Qty >= RNR Adjustment Qty : 100% Tolerance"
So it appears as though the rule names are not taking into account "special"
Is this to be expected?
I see now. Version 3.0.x still used integer codes for operators and that
is the reason the error message is saying operator '50'.
So, the problem is you are trying to use >= (operator 50) with a string
public static final int EQUAL = 1;
public static final int NOT_EQUAL = 10;
public static final int LESS = 20;
public static final int LESS_OR_EQUAL = 30;
public static final int GREATER = 40;
public static final int GREATER_OR_EQUAL = 50;
public static final int CONTAINS = 60;
public static final int MATCHES = 70;
public static final int EXCLUDES = 80;
Version 4.0 already uses type safe enums for operators, so message
will be better.
Back to your problem, I guess we should add support for comparisons
between strings using the java lexicographic order. We don't do it as of
What you can do as a work around is to use a predicate:
MyFact( $s: strAttr -> ( $s.compareTo( $otherValue ) >= 0 ) )
May I ask you please to open a JIRA with a feature request to support
comparison for string objects?
2007/5/24, Ronald R. DiFrango <ron.difrango(a)gmail.com>:
> I am using 3.0.5 of the IDE which is the latest version I could find on
> the update site.
> I have asked when the newer version might be posted, but I never did hear
> an answer back.
> On 5/23/07, Edson Tirelli <tirelli(a)post.com> wrote:
> > Ronald,
> > When you write an expression for a String attribute like:
> > Person( name > "Edson" )
> > It should raise an exception saying:
> > Operator '>' does not exists for StringEvaluator.
> > Although, he is saying Operator '50'?!?!
> > What version of drools are you using?
> > s
> > Edson
> > 2007/5/23, Ronald R. DiFrango < ron.difrango(a)gmail.com>:
> > >
> > > Anyone ever seen this error in the IDE:
> > >
> > > Severity and Description Path Resource Location Creation
> > > Time Id
> > > Operator '50' does not exist for StringEvaluator
> > > RtvDecisionEngine/src/rules/com/circuitcity/rtvcrms/rules rtv.drl
> > > Unknown 1179954317638 29080
> > >
> > > And if so what do you do about it? My rules file is just under 1000
> > > lines [and growing] and shows no other errors.
> > >
> > > _______________________________________________
> > > rules-users mailing list
> > > rules-users(a)lists.jboss.org
> > > https://lists.jboss.org/mailman/listinfo/rules-users
> > >
> > >
> > --
> > Edson Tirelli
> > Software Engineer - JBoss Rules Core Developer
> > Office: +55 11 3529-6000
> > Mobile: +55 11 9287-5646
> > JBoss, a division of Red Hat @ www.jboss.com
Software Engineer - JBoss Rules Core Developer
Office: +55 11 3529-6000
Mobile: +55 11 9287-5646
JBoss, a division of Red Hat @ www.jboss.com
Hi to all,
We wrote all the rules for leave application system. In which
way we can organize and store all the rules in database. Can i have any
example snippets of DAO implemention in drools rules.