Marina,

   My first advise for you is to forget JSR94. It is not worth to use it.

   Regarding the creation of rules via API, you can use the descriptor classes in the package: org.drools.lang.descr.

   There is not much documentation (anyone up to help on that?) but it is easy to understand how it works... just look at the result of parsing a DRL file and you will easily figure out:

DrlParser parser = new DrlParser();
PackageDescr pkgDescr = parser.parse( source );

     []s
     Edson

2008/5/25 Marina <ppine7@yahoo.com>:
Hello,

I am working on a project that requires a rules engine to handle numerous rules for approval chain determination. My main choice at the moment is JBoss Rules engine. One issue came up though that I could not find a good answer in the documentation:

Is it possible to create rules programmatically via a public API? We already have a (pretty complex) admin screen as part of our application where users can build conditions and specify desired approval chains using the UI, integrated with all our back end stuff (domain objects, permissions, common look&feel, etc.). It would be a huge overhead to serialize these rules into DRL/XML files/streams and then have the rules engine parse them again....

JSR94 solves the problem of handling rules once they are read from rule files, but there is nothing about creating and persisting rules, unless I missed it.

thanks,
Marina
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users



--
Edson Tirelli
JBoss Drools Core Development
Office: +55 11 3529-6000
Mobile: +55 11 9287-5646
JBoss, a division of Red Hat @ www.jboss.com