<br> Brian,<br><br> Easy to understand with String and Character, but what would be an empty Date or empty Number, etc? <br> Unfortunately the DSL template engine is a text template engine, and as so, does not validate type. The only thing I can think about is if you create a function that is called at runtime, evaluating parameter type and handling it appropriately.
<br><br> []s<br> Edson<br><br><br><div><span class="gmail_quote">2007/8/31, Brian Enderle <<a href="mailto:brianke@gmail.com">brianke@gmail.com</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
One of the checks that we are required to do on our data is that the data is<br>not blank, meaning the value retrieved from the DB is not null and not ""<br>(empty string) or '' (empty characer), etc..<br>
<br>Is there anyway to create a DSL entry to do this check regardless of the data<br>type (Stirng, character, Date, etc.) that is returned?<br><br>I have tried the obvious ({field} == null || {field} == "") but this only
<br>works for String types. I would really like to have just one DSL entry that<br>would handle all cases.<br><br>Thanks,<br>Brian Enderle<br><br><br><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">https://lists.jboss.org/mailman/listinfo/rules-users</a><br></blockquote></div>
<br><br clear="all"><br>-- <br> Edson Tirelli<br> Software Engineer - JBoss Rules Core Developer<br> Office: +55 11 3529-6000<br> Mobile: +55 11 9287-5646<br> JBoss, a division of Red Hat @ <a href="http://www.jboss.com">
www.jboss.com</a>