On 3/2/07, Aeinehchi Nader <Nader.Aeinehchi@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