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