Or, should we change the descrs to look like that? <br>how does that relate to the descrs? <br><br><div><span class="gmail_quote">On 2/28/07, <b class="gmail_sendername">Peter Lin</b> &lt;<a href="mailto:woolfel@gmail.com">
woolfel@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
although drools-compiler has the descr classes, it would be nice to have an Rule Object Model like the one I showed you guys.<br>
<br>
this way, a condition would be represented by a condition object like this<br>
<br>
public class Condition {<br>
<br>
&nbsp;&nbsp;&nbsp; /**<br>
&nbsp;&nbsp;&nbsp;&nbsp; * Added the attribute to make it easier to compile the rule to<br>
&nbsp;&nbsp;&nbsp;&nbsp; * java code<br>
&nbsp;&nbsp;&nbsp;&nbsp; */<br>
&nbsp;&nbsp;&nbsp; private String objectType;<br>
&nbsp;&nbsp;&nbsp; /**<br>
&nbsp;&nbsp;&nbsp; &nbsp;* if the attribute is bound to a variable, the method<br>
&nbsp;&nbsp;&nbsp; &nbsp;* should return the name of the variable.<br>
&nbsp;&nbsp;&nbsp; &nbsp;*/<br>
&nbsp;&nbsp;&nbsp; private String boundVariable;<br>
&nbsp;&nbsp;&nbsp; /**<br>
&nbsp;&nbsp;&nbsp;&nbsp; * the attribute of the object to match on<br>
&nbsp;&nbsp;&nbsp;&nbsp; */<br>
&nbsp;&nbsp;&nbsp; private String attribute;<br>
&nbsp;&nbsp;&nbsp; /**<br>
&nbsp;&nbsp;&nbsp;&nbsp; * the operator for the condition, which may be ==, !=<br>
&nbsp;&nbsp;&nbsp;&nbsp; * &lt;, &gt;, &lt;=, &gt;=, &lt;&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp; */<br>
&nbsp;&nbsp;&nbsp; private String operator;<br>
&nbsp;&nbsp;&nbsp; /**<br>
&nbsp;&nbsp;&nbsp;&nbsp; * The timestamp of the last change made to the condition.<br>
&nbsp;&nbsp;&nbsp;&nbsp; * this attribute is optional and is meant to make it<br>
&nbsp;&nbsp;&nbsp;&nbsp; * easier to run queries on the rules by timestamp<br>
&nbsp;&nbsp;&nbsp;&nbsp; */<br>
&nbsp;&nbsp;&nbsp; private long timestamp;<br>
&nbsp;&nbsp;&nbsp; /**<br>
&nbsp;&nbsp;&nbsp;&nbsp; * the value of the condition<br>
&nbsp;&nbsp;&nbsp;&nbsp; */<br>
&nbsp;&nbsp;&nbsp; private String value;<br>
&nbsp;&nbsp;&nbsp; /**<br>
&nbsp;&nbsp;&nbsp;&nbsp; * the value can be either a single literal value or a list<br>
&nbsp;&nbsp;&nbsp;&nbsp; * of values of the same type<br>
&nbsp;&nbsp;&nbsp;&nbsp; */<br>
&nbsp;&nbsp;&nbsp; private String valueType = null;<br>
&nbsp;&nbsp;&nbsp; /**<br>
&nbsp;&nbsp;&nbsp;&nbsp; * the version of the condition. for advanced reporting, it&#39;s<br>
&nbsp;&nbsp;&nbsp;&nbsp; * easier if the condition is tagged with a version number.<br>
&nbsp;&nbsp;&nbsp;&nbsp; */<br>
&nbsp;&nbsp;&nbsp; private String version;<br>
}<br>
<br>
I&#39;m totally bias, but it would make writing tools easier. things like
rule repo, validation, impact analysis, queries and reporting simpler :)<br><span class="sg">
<br>
<br>
peter</span><div><span class="e" id="q_11105c5683ce0db6_2"><br><br><div><span class="gmail_quote">On 2/27/07, <b class="gmail_sendername">Mark Proctor</b> &lt;<a href="mailto:mproctor@codehaus.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
mproctor@codehaus.org</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">



  

<div bgcolor="#ffffff" text="#000000">
Suggest away.<br>
<br>
Mark<br>
Michael Neale wrote:
<blockquote type="cite"><span>Guys - are there going to be any changes to the compiler
API now? Cause now is the time to fix/change it if needed.<br>
  <br>
I have some suggestions if anyone is interested.<br>
  </span><pre><hr size="4" width="90%"><br>_______________________________________________<br>rules-dev mailing list<br><a href="mailto:rules-dev@lists.jboss.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">

rules-dev@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>

  </pre>
</blockquote>
<br>
</div>

<br>_______________________________________________<br>rules-dev mailing list<br><a href="mailto:rules-dev@lists.jboss.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">rules-dev@lists.jboss.org
</a><br><a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
https://lists.jboss.org/mailman/listinfo/rules-dev</a><br><br></blockquote></div><br>
</span></div><br>_______________________________________________<br>rules-dev mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a>
<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br><br></blockquote></div><br>