<div><br></div><div>A (dynamic) &quot;request&quot; with a &quot;logical expression&quot; that is to be evaluated as </div><div>a rule is very much like a (dynamic) SQL query to be evaluated on a database.</div><div><br></div>
<div>Are you sure that Drools is the right platform?</div><div><br></div><div>If &quot;someone&quot; wants to send a logical expression in a formal language of their</div><div>own, you&#39;ll have to parse that expression and translate it into the Drools Rule</div>
<div>Language (aka DRL). Perhaps a Domain Specific Language might help, but</div><div>there&#39;s no telling from the very sparse information you&#39;ve provided. (In any case</div><div>&quot;someone&quot; and Drools will have to agree on the  data model and the way to </div>
<div>refer to the data, or else you&#39;ll have to do more work.)</div><div><br></div><div>-W</div><br><br><div class="gmail_quote">On 26 February 2012 16:00, shawn <span dir="ltr">&lt;<a href="mailto:youngxiao121@hotmail.com">youngxiao121@hotmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Sorry, I forget to mention one thing.<br>
What&#39;s really difficult for me is to translate the &quot;AND&quot;,&quot;OR&quot;(Condition 1<br>
AND Condition 2 OR Condition 3....) to the drool.<br>
Because someone will send the request with the expression(Condition 1 AND<br>
Condition 2 OR Condition 3....) to me. For each request the expression is<br>
different. They hope I can translate the &quot;AND&quot;,&quot;OR&quot; to rule file<br>
automatically. They don&#39;t want drool to parse the expression(maybe string)<br>
to pick &quot;AND&quot;, &quot;OR&quot;.  This is why they want to have a rule file for each<br>
request. They want to trigger the function to make a rule file when they are<br>
making the expression, not only simply send me the expression and verify<br>
it..<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/How-to-create-a-drl-file-or-decision-table-dynamically-tp3772708p3777057.html" target="_blank">http://drools.46999.n3.nabble.com/How-to-create-a-drl-file-or-decision-table-dynamically-tp3772708p3777057.html</a><br>

<div class="HOEnZb"><div class="h5">Sent from the Drools: User forum mailing list archive at Nabble.com.<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" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</div></div></blockquote></div><br>