<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi all,<br><br>I am using the latest Guvnor release (5.1), and I have the following DSL expression where I use "-" to have conditions on multiple lines:<br><br>[when] There is an Asset=asset:Asset()<br>[when]- name is empty=eval(StringUtils.isBlank(name))<br>[when]- tag is empty=eval(StringUtils.isBlank(tag))<br><br>Having these DSL expressions, I wanted to create a rule, but I ran into some issues. <br>To summarize: There seems to be a parsing error, when conditions are added in DSL using "-".&nbsp; Did anybody else run into this problem? I wonder if I do something wrong, but, re-creating the DSL to have the 2 conditions into one expression, is all working fine. It may be a combination of "-" and eval? <br><br>Below, is the description of rules created, and error I got.<br><br>First, I created a rule using the above DSL expressions in the BRL editor. While the
 rule looked ok in the editor, and it validated fine, only when I checked the source I noticed is wrong. So, the rule source looks like this:<br>rule "test_dsl"<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; dialect "mvel"<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; when<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; asset:Asset( eval(StringUtils.isBlank(name, eval(StringUtils.isBlank(tag)) )) )<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; then<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; asset.setStatus("INVALID")<br>&nbsp;&nbsp;&nbsp; end<br><br>It looks that the conditions are parsed incorrectly, and the second eval condition is added as a parameter to the StringUtils.isBlank from the first eval. Also, all the right parenthesis are added at the end of the expression. If I add one condition at a time, it all works fine. The error is when I have more than 1 condition. <br><br>So, I created a new DSL, that contains both
 conditions into one line, eliminating the hyphen between conditions:<br><br>[when] There is an asset with name empty AND tag empty =asset:Asset(eval(StringUtils.isBlank(name)),eval(StringUtils.isBlank(tag)))<br><br>Using&nbsp; BRL editor, I created a second rule using the DSL above. The rule validated ok, and the rule source looks fine:<br><br>rule "test_dsl_1"<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; dialect "mvel"<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; when<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; asset:Asset(eval(StringUtils.isBlank(name)),eval(StringUtils.isBlank(tag)))<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; then<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; asset.setStatus("INVALID")<br>&nbsp;&nbsp;&nbsp; end<br><br>I created a test for this rule, that ran correctly.<br><br><br>Thanks,<br>Patricia<br></td></tr></table><br>