As Mark said, operators are not pluggable right now. If you think you can
help providing a patch to make them pluggable, I can help you find the way.
Also, on the same topic, version 4.0 has a lot of improvements on type
coercion, so you will probably stop seeing problems like comparing shorts
and integers, as you mentioned.
2007/6/16, Mark Proctor <mproctor(a)codehaus.org>:
We've have plans for pluggeable operators, just no time to implement
them, maybe in the next release :)
Yuri de Wit wrote:
> I am using JBoss Rules 3.0.6 and in many situations I was forced to
> use a Java snipped predicates ( p.property -> ( fn.doSomething(p, a))
> which clutters the rules quite a bit ) to override or correct the
> behaviour of some of the operators such as ==, !=, etc. It would be
> nice if there was an easy way for me to override them by providing my
> own implementation. I could then subclass the default one provided by
> JBoss Rules and customized the ones I need.
> I know that this sugestiong would allow us to modify the semantic of
> the rules language operators but it at least would provide a nice way
> out of issues (such as using == between a Short and a Integer) we come
> accross, could help debugging predicate evaluations (I guess I could
> always add a breakpoint to a specific class from the rules engine -
> which class?).
> On the same topic would it be possible to add new operators to the
> rules-users mailing list
rules-users mailing list
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