Yes, simplest thing to do is to use the descriptors. There is no
documents yet (help welcome), but one can use the DRL/XML dumpers to test if
what you are generating is what you want.
In the end, the way we support multiple languages (DRL, XML, CLP...) is
to use the descriptors as an intermediate format, so, any framework/language
driver you ends up creating will in the end generate descriptors.
[]s
Edson
2007/7/16, Dean Jones <dean.m.jones(a)gmail.com>:
Hello Eugeny,
Not sure if this is the recommended way, but I did something similar
using the classes in the org.drools.lang.descr package. You can create
a PackageDescr from your custom objects and then call
PackageBuilder.addPackage(PackageDescr) and
PackageBuilder.getPackage() to get an org.drools.rule.Package.
I couldn't find any documentation on the org.drools.lang.descr package
(javadoc is pretty minimal as well), but you should be able to work
out what to do, at least for the basic stuff.
Best wishes,
Dean.
On 7/16/07, Eugeny N Dzhurinsky <bofh(a)redwerk.com> wrote:
> Hello!
>
> We are about to develop an application where customers are responsible
to
> create various rules and define actions. There are a dictionary of
available
> conditions applied to objects as well as set of predefined actions.
>
> For now we know there is a DRL, which is parsed and certain actions are
> executed, but we think the way
>
> our custom objects -> generate DRL -> parse DRL by Drools -> inject
rules objects
>
> is a bit redundant, in such way we need to create additional layer to
generate
> something which is to be parsed then by Drools.
>
> We would like to avoid such complexity, if possible.
>
> Is it possible to create our own objects which will act as rules for
Drools
> framework, so we can implement some interfaces/inherit some abstract
classes
> and inject our custom logic/objects there?
>
> Thank you in advance!
>
> --
> Eugene N Dzhurinsky
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/rules-users
>
_______________________________________________
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