<p>Hi W, thanks for the valuable info. To give you more clarity on what my data generator is trying to do I&#39;ll give you examples of some scenario:</p>
<p>There is property called age in my java application of data type integer for which 1000 random ages have to be generated. Now there is a rule associated with this &#39;age&#39; property inside drools which says &#39;age should be between 18 and 60&#39;. The java application has to go, fetch this rule from drools, come back to the java layer and generate 1000 random integers between the values 18 and 60.</p>

<p>There is a property called Date in my java application of data type data for which 250 random dates have to be generated. Now there is a rule associated with this &#39;date&#39; property inside drools which says &#39;dates should only be between current month and last month&#39;. The  java application has to go, fetch this rule from drools, come back to java layer and generate 250 random dates between current and previous month.</p>

<div>The data generation java functions are written and called based on the given rule and data type.</div>
<div> </div>
<div>Can operations of these types be achieved with the use of drools?</div>
<div> </div>
<div>Regards,</div>
<div>Praveen.<br></div>
<div class="gmail_quote">On Fri, Apr 1, 2011 at 12:34 PM, Wolfgang Laun <span dir="ltr">&lt;<a href="mailto:wolfgang.laun@gmail.com" target="_blank">wolfgang.laun@gmail.com</a>&gt;</span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">Yes, it would be possible, Rules, after compilation, are available as<br>Abstract Syntax Trees, representing the conditions. However, to access<br>
these objects, you need to use classes from the &quot;unstable&quot; part of the<br>API, and there won&#39;t be much documentation helping you along.<br><br>Let me say that this is a very roundabout way of defining limits for<br>
data generation. A conidtion is nothing but a boolean expression with<br>extensions such as &quot;forall&quot;, &quot;exists&quot;, &quot;not&quot;, &quot;collect&quot;, &quot;accumulate&quot;,<br>which (I think) you won&#39;t be using anyway.<br>
<br>But I reserve my judgement because I don&#39;t know the specification for<br>your data generator.<br><font color="#888888"><br>-W<br></font>
<div>
<div></div>
<div><br><br>On 1 April 2011 08:40, praveen p &lt;<a href="mailto:p.praveenn@gmail.com" target="_blank">p.praveenn@gmail.com</a>&gt; wrote:<br>&gt; Hi,<br>&gt;<br>&gt; I&#39;m not using drools to generate data, a java program would do that. I just<br>
&gt; want to know whether the java program can connect to drools, fetch<br>&gt; corresponding rules from it and generate data based on the rule fetched(the<br>&gt; conditions for data generation and the upper and lower limits come from<br>
&gt; rules). Please let me know if this is possible.<br>&gt;<br>&gt; Regards,<br>&gt; Praveen.<br>&gt;<br>&gt;<br>&gt;<br>&gt; On Tue, Mar 29, 2011 at 7:17 PM, Wolfgang Laun &lt;<a href="mailto:wolfgang.laun@gmail.com" target="_blank">wolfgang.laun@gmail.com</a>&gt;<br>
&gt; wrote:<br>&gt;&gt;<br>&gt;&gt; Rules do not generate data. Rules can tell you whether existing data meets<br>&gt;&gt; conditions. Now if you create test data randomly, you can run a rule base<br>&gt;&gt; with this data, and at the end of the day, you will know whether you have a<br>
&gt;&gt; data set matching a certain rule - or not. But I don&#39;t think that this<br>&gt;&gt; approach is the way you should go.<br>&gt;&gt; -W<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt; On 29 March 2011 15:12, praveen p &lt;<a href="mailto:p.praveenn@gmail.com" target="_blank">p.praveenn@gmail.com</a>&gt; wrote:<br>
&gt;&gt;&gt;<br>&gt;&gt;&gt; Hi,<br>&gt;&gt;&gt;<br>&gt;&gt;&gt;<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; We need to make a decision on whether to use Jboss drools for our<br>&gt;&gt;&gt; project, please help me out on this. We are planning to develop a tool which<br>
&gt;&gt;&gt; generates random test data based on some conditions. These conditions can be<br>&gt;&gt;&gt; something like age&gt;18&lt;60, 6 lettered string containing only first four<br>&gt;&gt;&gt; letters of an alphabet, Amount=Price*quantity. We are planning to store<br>
&gt;&gt;&gt; these conditions in drools rule engine and generate data based on them. The<br>&gt;&gt;&gt; java application has to connect to drools, fetch the rule associated with a<br>&gt;&gt;&gt; property, get back to java layer and generate some output based on these<br>
&gt;&gt;&gt; rules. Is this possible using drools? Please let me know the possibility and<br>&gt;&gt;&gt; provide some clarity on it.<br>&gt;&gt;&gt;<br>&gt;&gt;&gt;<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; Regards,<br>&gt;&gt;&gt;<br>
&gt;&gt;&gt; Praveen.<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; _______________________________________________<br>&gt;&gt;&gt; rules-dev mailing list<br>&gt;&gt;&gt; <a href="mailto:rules-dev@lists.jboss.org" target="_blank">rules-dev@lists.jboss.org</a><br>
&gt;&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>&gt;&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt; _______________________________________________<br>
&gt;&gt; rules-dev mailing list<br>&gt;&gt; <a href="mailto:rules-dev@lists.jboss.org" target="_blank">rules-dev@lists.jboss.org</a><br>&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
&gt;&gt;<br>&gt;<br>&gt;<br>&gt; _______________________________________________<br>&gt; rules-dev mailing list<br>&gt; <a href="mailto:rules-dev@lists.jboss.org" target="_blank">rules-dev@lists.jboss.org</a><br>&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
&gt;<br>&gt;<br><br>_______________________________________________<br>rules-dev mailing list<br><a href="mailto:rules-dev@lists.jboss.org" target="_blank">rules-dev@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
</div></div></blockquote></div><br>