Trevor,
As Michael said, at the moment, it is not possible to plug custom
extractors. Next version also will add shadow facts on top of asserted
beans to make sure changes to beans values are only visible to the
engine when they should, not before, avoiding bugs and strange behaviors.
Shadow facts as they are right now, rely on parameterless methods to
cache values, in the same way current extractors do. So, to be able to
develop something that will allow plugable extractors, would also
require thinking about shadow facts.
On the other hand, also in development is a new language for bean
property access and bean structure navigation. So, maybe if you can
share how is the structure of the classes/beans you are working with, if
it is something can be made generic, we could add some kind of support
to it. Better yet, if you want, you can contribute with a patch to
leverage the implementation to support your needs... after all, it is
open source... :)
[]s
Edson
Michael Neale wrote:
not at the moment no - I am not sure what state it is in for the next
version though.
But to answer your immediate need, you can actually use non getter
methods:
say you have a Object called Cheese, and methods like:
public String name();
public int price();
you can actually use them as fields in a rule:
Cheese(name == ..., price == ..)
getters are a "special" case, in which it is converted to the bean
name. But if you have non getter methods (as long as they take no
parameters, and return a value) then you can use them in rules !
Michael
On 10/26/06, *Trevor Pocock* <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
Hi
this has probably been discussed already, but is there any
mechanism available
to register my own extractor factory? Background is we've got lots
of wonderful
business objects with a proprietary getter / setter mechanism
which allows us to
build paths over related objects and handle lots of great stuff.
Problem is the objects aint Beans and aint never gonna be Beans,
so use of the
rule engine is going to be limited to those business objects we
add getBlah
methods to.
Anyone done it?
T
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email