<div><br></div> Wolfgang,<div><br></div><div> These are remaining bugs that must be fixed before final. Goal is to support free form expressions as long as they return a boolean value (for traditional constraints), or any value (for positional). Period.</div>
<div><br></div><div> Edson<br><br><div class="gmail_quote">2011/5/5 Wolfgang Laun <span dir="ltr"><<a href="mailto:wolfgang.laun@gmail.com">wolfgang.laun@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<h1 style="font-weight:normal"><font size="2"><a>In the 5.2.0 Drools Introduction and General User Guide</a>, there's section 2.1.3.1, Free Form expressions in Constraints (New Parser). It contains several examples:</font><br>
</h1>#1 Person( age * 2 > $anotherPersonsAge + 2 ) <br>#2 Person( addresses["home"].streetName.startsWith( "High Park" ) )<br>#3 Person( isAdult() )<br><br>#1 does not compile: Unable to build constraint as 'age * 2' is invalid : [Rule name='exa1']<br>
<br>#2 works - although I'd very much prefer not to be swamped with MVEL extensions unless I ask for it.<br><br>#3 does not compile: Unable to Analyse Expression isAdult():<br>[Error: no such identifier: isAdult]<br>
[Near : {... isAdult() ....}]<br>
<br>Neither rule name nor line number is provided.<br><br>Would it please be possible to have a precise statement what one <i>can</i> write as a constraint?<br><br><br><quote><br><a>This was also important for us to start to move towards a
single consistent grammer for both the "when" left hand side and "then"
right hand side.<br></quote><br><br>It seems that example #2 increases the grammar gap because the constraint expression can certainly not used on the RHS.<br><br><br><quote><br></a><a>As previously we had to document the restricted
limitations of a field constraint on the LHS compared to expressions
used inside of an 'eval' or used on the RHS.</a><a><br> </quote><br><br>I'm sorry, but I do not understand the meaning of this sentence. What does it mean, please?<br><br>Cheers<br>Wolfgang<br>
<br><br></a>
<br>_______________________________________________<br>
rules-dev mailing list<br>
<a href="mailto:rules-dev@lists.jboss.org">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>
<br></blockquote></div><br><br clear="all"><br>-- <br> Edson Tirelli<br> JBoss Drools Core Development<br> JBoss by Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>
</div>