<p>Edson's proposal is probably what you're after for 5.2+, Guvnor also has an 'internal' API that it uses to construct rules - although this ultimately become DRL that is compiled.</p>
<p>sent on the move</p>
<p>On 1 Jun 2011 15:52, "Mark Proctor" <<a href="mailto:mproctor@codehaus.org">mproctor@codehaus.org</a>> wrote:<br type="attribution">> You can also just generate strings at runtime, either via StringBuilder <br>
> or templating, and compile them at runtime.<br>> <br>> Mark<br>> On 01/06/2011 14:43, Edson Tirelli wrote:<br>>><br>>> David,<br>>><br>>> For 5.2 we are introducing a high level API for rule authoring. <br>
>> Documentation is not ready yet, but you can see the API here:<br>>><br>>> <a href="https://github.com/droolsjbpm/drools/tree/master/drools-compiler/src/main/java/org/drools/lang/api">https://github.com/droolsjbpm/drools/tree/master/drools-compiler/src/main/java/org/drools/lang/api</a><br>
>><br>>> DescrFactory is your entry point.<br>>><br>>> Before 5.2, the options are to generate DRL string using templates <br>>> or build the *Descr AST manually. Please note that the *Descr classes <br>
>> are internal and might change from version to version.<br>>><br>>> Edson<br>>><br>>> 2011/6/1 David Godfrey <<a href="mailto:davidgodf@gmail.com">davidgodf@gmail.com</a> <mailto:<a href="mailto:davidgodf@gmail.com">davidgodf@gmail.com</a>>><br>
>><br>>> Hi,<br>>><br>>> Can someone point me in the direction of documentation or code<br>>> examples for the following? I want to programatically create rules<br>>> for execution, e.g. within my application I will hold criteria<br>
>> which users will define, at runtime I would like to build a<br>>> component to extract these values (from my app database) and build<br>>> rules based on those values. Everything I've seen so far seems to<br>
>> talk about using DRL files, ideally I want to programatically<br>>> create the entire rule in Java, and then call Drools to execute my<br>>> rule set.<br>>><br>>> Thanks,<br>
>><br>>> _______________________________________________<br>>> rules-users mailing list<br>>> <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a> <mailto:<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>><br>
>> <a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>>><br>>><br>>><br>>><br>>> -- <br>>> Edson Tirelli<br>
>> JBoss Drools Core Development<br>>> JBoss by Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a> <<a href="http://www.jboss.com">http://www.jboss.com</a>><br>>><br>>><br>>> _______________________________________________<br>
>> rules-users mailing list<br>>> <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>>> <a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
> <br></p>