<div dir="ltr">Hi,<div><br></div><div>I opened myself a good can of worms yesterday.</div><div><br></div><div>The long and short of it is the following behave differently (with regard to the DRL generated):-</div><div><ul>
<li>XLS Decision Tables<br></li><li>Templates<br></li><li>KIE-WB Guided Decision Tables<br></li><li>KIE-WB Guided Decision Table Template fragments<br></li></ul></div><div><div>There is a further complication: <a href="https://bugzilla.redhat.com/show_bug.cgi?id=996964">https://bugzilla.redhat.com/show_bug.cgi?id=996964</a><br>
</div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"></blockquote><div><br></div>All of the listed rule types currently discount a constraint if it#s value is empty, or value.trim() is empty. The requirement really only affects String field types. The difficulty is how to differentiate between a null-value (empty cell) and empty-string that works consistently with XLS and the KIE-WB editors.<br>
<blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><br></blockquote>So, my question is what behaviour should we standardize on?<br></div><div><br></div><div>I propose the following:</div><div><ul><li>For a Pattern, with no constraints we exclude the pattern (this is current XLS behaviour).<br>
</li></ul></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div>e.g. Person( name == $name, age == $age ). If we don&#39;t provide values for $name and $age we don&#39;t include the Person pattern. If a user wants to include the Pattern they&#39;d need to add a constraint &quot;this != null&quot;. </div>
<div><br></div><div>If we include the pattern when there are no constraints then it is more difficult to provide a work-around to exclude the pattern if this is what some users need (and since it&#39;s the existing behaviour; less likely to be an issue for the majority of XLS users).</div>
<div><br></div></blockquote><div><ul><li>Support escaping String literals with quotes; so a user would enter &quot;&quot; or &quot;   &quot;. This make it obvious that the cell contains a non-null value. The surrounding quotation marks would be stripped before being used in the DRL.<br>
</li></ul><div><br></div></div><div>WDYT? Should I put this out to the community for opinions too?</div><div><br></div><div>With kind regards,</div><div><br></div><div>Mike</div></div>