<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Oh, it's been dragging on longer than that. &nbsp;I used it in OPSJ in 1999. :P<br><br>--- On <b>Thu, 3/31/11, Michael Neale <i>&lt;michael.neale@gmail.com&gt;</i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Michael Neale &lt;michael.neale@gmail.com&gt;<br>Subject: Re: [rules-dev] Decision table - Otherwise<br>To: "Rules Dev List" &lt;rules-dev@lists.jboss.org&gt;<br>Date: Thursday, March 31, 2011, 4:20 PM<br><br><div id="yiv398270946">Otherwise has been dragging on since 2006. There are many skeletons in that cave.&nbsp;<div><br></div><div>I will believe it when I see it !<br><br><div class="yiv398270946gmail_quote">On Fri, Apr 1, 2011 at 7:25 AM, Michael Anstis <span dir="ltr">&lt;<a rel="nofollow" ymailto="mailto:michael.anstis@gmail.com" target="_blank"
 href="/mc/compose?to=michael.anstis@gmail.com">michael.anstis@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="yiv398270946gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">I bet Edson can't wait to refactor the parser for that ;)<div><div></div><div class="yiv398270946h5"><br><br><div class="yiv398270946gmail_quote">
On 31 March 2011 21:11, Mark Proctor <span dir="ltr">&lt;<a rel="nofollow" ymailto="mailto:mproctor@codehaus.org" target="_blank" href="/mc/compose?to=mproctor@codehaus.org">mproctor@codehaus.org</a>&gt;</span> wrote:<br>
<blockquote class="yiv398270946gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex;">

  
    
  
  <div>
    on a related note I do plan to add OTHERWISE support at a DRL level,
    just no time to do it right now. Once it's supported at a DRL level,
    you won't need to as much work on figuring out the inverse options
    etc.<br>
    <br>
    Mark<div><div></div><div><br>
    On <a rel="nofollow">31/03/2011 20</a>:25, Michael Anstis wrote:
    </div></div><blockquote type="cite"><div><div></div><div>Hi,<br>
      <br>
      I'm adding support for "otherwise" to (for the time being) the
      guided decision table in Guvnor.<br>
      <br>
      The idea being if you set a cell to represent "otherwise" the
      generated rule is the opposite of the accumulation of the other
      cells; perhaps best explained with an example:-<br>
      <br>
      <div style="margin-left:40px;"><span style="font-family:courier new, monospace;">Person( name == )</span><br style="font-family:courier new, monospace;">
        <span style="font-family:courier new, monospace;">Mark</span><br style="font-family:courier new, monospace;">
        <span style="font-family:courier new, monospace;">Kris</span><br style="font-family:courier new, monospace;">
        <span style="font-family:courier new, monospace;">Geoffrey</span><br style="font-family:courier new, monospace;">
        <span style="font-family:courier new, monospace;">&lt;otherwise&gt;</span><br style="font-family:courier new, monospace;">
      </div>
      <br>
      This would generate:-<br>
      <br>
      <span style="font-family:courier new, monospace;">Person(name not
        in ("Mark", "Kris", "Geoffrey")</span><br style="font-family:courier new, monospace;">
      <br>
      Equals is the simple example, this is my thoughts for the other
      operators we might like to support:-<br>
      <ul>
        <li>!= becomes "in (&lt;list of the other cells' values)"</li>
        <li>&lt; becomes "&gt;= the maximum value of the other cells'
          values</li>
      </ul>
      <br>
      <div style="margin-left:40px;">For example:-<br>
        <br>
        <span style="font-family:courier new, monospace;">Person ( age
          &lt; )</span><br style="font-family:courier new, monospace;">
        <span style="font-family:courier new, monospace;">10</span><br style="font-family:courier new, monospace;">
        <span style="font-family:courier new, monospace;">20</span><br style="font-family:courier new, monospace;">
        <span style="font-family:courier new, monospace;">30</span><br style="font-family:courier new, monospace;">
        <span style="font-family:courier new, monospace;">&lt;otherwise&gt;</span><br style="font-family:courier new, monospace;">
        <br style="font-family:courier new, monospace;">
        <span style="font-family:courier new, monospace;">Person ( age
          &gt;= 30 )</span></div>
      <br>
      <ul>
        <li>&lt;= becomes "&gt; the maximum value of the other cells'
          values</li>
        <li>&gt; becomes "&lt;= the minimum value of the other cells'
          values</li>
        <li>&gt;= becomes "&lt; the minimum value of the other cells'
          values</li>
        <li>"in" becomes "not in (&lt;a list of all values contained in
          all the other cells' lists of values&gt;)"</li>
      </ul>
      <div style="margin-left:40px;">For example:-<br>
      </div>
      <br>
      <div style="margin-left:40px;">
        <span style="font-family:courier new, monospace;">Person ( name
          in )</span><br style="font-family:courier new, monospace;">
        <span style="font-family:courier new, monospace;">Jim, Jack</span><br style="font-family:courier new, monospace;">
        <span style="font-family:courier new, monospace;">Lisa, Jane,
          Paul</span><br style="font-family:courier new, monospace;">
        <span style="font-family:courier new, monospace;">&lt;otherwise&gt;</span><br style="font-family:courier new, monospace;">
        <br style="font-family:courier new, monospace;">
        <span style="font-family:courier new, monospace;">Person ( name
          not in ("Jim", "Jack", "Lisa", "Jane", "Paul" ) )</span><br>
        <br>
      </div>
      <ul>
        <li>I'm not sure there is a simple solution for "matches" and
          "soundslike" but welcome advice, although a possibility might
          be to create a compound field constraint:-<br>
        </li>
      </ul>
      <div style="margin-left:40px;">
        <span style="font-family:courier new, monospace;">Person ( name
          soundslike )</span><br style="font-family:courier new, monospace;">
        <span style="font-family:courier new, monospace;">Fred</span><br style="font-family:courier new, monospace;">
        <span style="font-family:courier new, monospace;">Phil</span><br style="font-family:courier new, monospace;">
        <br style="font-family:courier new, monospace;">
        <span style="font-family:courier new, monospace;">not Person (
          name soundslike "Fred" || soundslike "Phil" )</span><br style="font-family:courier new, monospace;">
      </div>
      <br>
      <br>
      Would this be considered the most suitable approach?<br>
      <br>
      Inputs and thoughts welcome.<br>
      <br>
      Thanks,<br>
      <br>
      Mike <br>
      <br>
      </div></div><pre><fieldset></fieldset>
_______________________________________________
rules-dev mailing list
<a rel="nofollow" ymailto="mailto:rules-dev@lists.jboss.org" target="_blank" href="/mc/compose?to=rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a>
<a rel="nofollow" target="_blank" href="https://lists.jboss.org/mailman/listinfo/rules-dev">https://lists.jboss.org/mailman/listinfo/rules-dev</a>
</pre>
    </blockquote>
    <br>
  </div>

<br>_______________________________________________<br>
rules-dev mailing list<br>
<a rel="nofollow" ymailto="mailto:rules-dev@lists.jboss.org" target="_blank" href="/mc/compose?to=rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a><br>
<a rel="nofollow" target="_blank" href="https://lists.jboss.org/mailman/listinfo/rules-dev">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
<br></blockquote></div><br>
</div></div><br>_______________________________________________<br>
rules-dev mailing list<br>
<a rel="nofollow" ymailto="mailto:rules-dev@lists.jboss.org" target="_blank" href="/mc/compose?to=rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a><br>
<a rel="nofollow" target="_blank" href="https://lists.jboss.org/mailman/listinfo/rules-dev">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Michael D Neale<br>home: <a rel="nofollow" target="_blank" href="http://www.michaelneale.net">www.michaelneale.net</a><br>blog: <a rel="nofollow" target="_blank" href="http://michaelneale.blogspot.com">michaelneale.blogspot.com</a><br>

</div>
</div><br>-----Inline Attachment Follows-----<br><br><div class="plainMail">_______________________________________________<br>rules-dev mailing list<br><a ymailto="mailto:rules-dev@lists.jboss.org" href="/mc/compose?to=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></div></blockquote></td></tr></table><br>