[rules-users] Using Java to write rules?

Marcus Ilgner marcus.ilgner at gmail.com
Fri Mar 2 09:35:36 EST 2007


On 3/2/07, Aeinehchi Nader <Nader.Aeinehchi at edb.com> wrote:
>
>  I wonder if it is possible to write rules and make queries toward the
> knowledge database of Jboss Rules using Java language itself.  What I need
> is to to be able to access the rule engine's API.
>
> I do not want to use Drools language or XML.
>

Although I guess that it would be possible to make all those calls manually,
I wonder what the advantage would be.
The RHS of a rule is already Java code and the LHS provides a lot of Java
functionality or can use eval() if neccessary.
Also you can embed the DRL in your source or dynamically create new rules
and add those using StringReader if need be: I'm currently working on a
business project where new rules are assembled by the application: POC works
like a charm.
If that is not feasible, I'd probably take a look at the
drools-decisiontables codebase which basically does a similar thing: replace
DRL/XML syntax with a new interface (decision tables).
Anyway, that's just my $0.02 ;)

Best regards
Marcus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20070302/495bec60/attachment.html 


More information about the rules-users mailing list