You can also just generate strings at runtime, either via StringBuilder or templating, and compile them at runtime.

Mark
On 01/06/2011 14:43, Edson Tirelli wrote:

   David,

   For 5.2 we are introducing a high level API for rule authoring. Documentation is not ready yet, but you can see the API here:

https://github.com/droolsjbpm/drools/tree/master/drools-compiler/src/main/java/org/drools/lang/api

   DescrFactory is your entry point.

   Before 5.2, the options are to generate DRL string using templates or build the *Descr AST manually. Please note that the *Descr classes are internal and might change from version to version.

   Edson

2011/6/1 David Godfrey <davidgodf@gmail.com>
Hi,

Can someone point me in the direction of documentation or code examples for the following? I want to programatically create rules for execution, e.g. within my application I will hold criteria which users will define, at runtime I would like to build a component to extract these values (from my app database) and build rules based on those values. Everything I've seen so far seems to talk about using DRL files, ideally I want to programatically create the entire rule in Java, and then call Drools to execute my rule set.

Thanks,

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




--
  Edson Tirelli
  JBoss Drools Core Development
  JBoss by Red Hat @ www.jboss.com
_______________________________________________ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users