[rules-users] JBoss Rules IDE Error on StringEvaluator
Edson Tirelli
tirelli at post.com
Thu May 24 11:01:25 EDT 2007
Yes, we know error messages are still not good and we are working on
improving them.
[]s
Edson
2007/5/24, Ronald R. DiFrango <ron.difrango at gmail.com>:
>
> On a similar note, it would be good if the line numbers were displayed so
> I could find the error much easier. [I do not that is TONS easier than in
> the old 2.x days]
>
> On 5/24/07, Ronald R. DiFrango <ron.difrango at gmail.com> wrote:
> >
> > Edson,
> >
> > Actually, I am glad it caught it, because that was not my intent at
> > all. I was a global search and replace issue on my part.
> >
> > If you added in support for these operations, I still think a warning
> > would be in order because that may not be what you intended,
> >
> > I am considering the move to 4.0.x series, but I have hard deadline and
> > am being risk averse at this point.
> >
> > Ron
> >
> > On 5/24/07, Edson Tirelli <tirelli at post.com> wrote:
> > >
> > >
> > > Ronald,
> > >
> > > 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 attribute:
> > >
> > > 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 today.
> > >
> > > 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?
> > >
> > > Thank you,
> > > Edson
> > >
> > > 2007/5/24, Ronald R. DiFrango < ron.difrango at gmail.com>:
> > > >
> > > > Edson,
> > > >
> > > > 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.
> > > >
> > > > Ron
> > > >
> > > > On 5/23/07, Edson Tirelli <tirelli at 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 at 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 at 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
> > > >
> > > >
> > > >
> > >
> > >
> > > --
> > > 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
> > >
> > > _______________________________________________
> > > rules-users mailing list
> > > rules-users at lists.jboss.org
> > > https://lists.jboss.org/mailman/listinfo/rules-users
> > >
> > >
> >
>
> _______________________________________________
> rules-users mailing list
> rules-users at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20070524/b9caa861/attachment.html
More information about the rules-users
mailing list