If you put an X or something in the cell (i.e. just don&#39;t leave it empty) it should also work.<br><br><div class="gmail_quote">On Tue, Jan 13, 2009 at 10:57 AM, Edson Tirelli <span dir="ltr">&lt;<a href="mailto:tirelli@post.com">tirelli@post.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>&nbsp;&nbsp;&nbsp;&nbsp; The action is not being executed. I don&#39;t use decision tables frequently, but I think that it ignores empty cells and is generating an empty consequence for your rule. Usually, you would place the method call on the header prototype and the parameter in the cell. So your cell would be:<br>

<br>| hoover | true |<br>| xyz | false |<br><br>&nbsp;&nbsp;&nbsp;&nbsp; The method prototype would be something like (please check the correct syntax in the manual):<br><br>brand.setGoodBrand( $param );<br><br>&nbsp;&nbsp;&nbsp;&nbsp; Where the engine would replace $param by the value you write in the cell.<div>
<div></div><div class="Wj3C7c"><br>
<br>&nbsp;&nbsp;&nbsp;&nbsp; []s<br>&nbsp;&nbsp;&nbsp;&nbsp; Edson<br><br><div class="gmail_quote">2009/1/12 Costello, Robert <span dir="ltr">&lt;<a href="mailto:rcost10@searshc.com" target="_blank">rcost10@searshc.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">











<div link="blue" vlink="blue" lang="EN-US">

<div>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">I tried that and it returned false, which
doesn&#39;t make sense to me since the rule firing is to set the value to
true, and in the execution the rule does fire. &nbsp;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;</span></font></p>

<p><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
StatefulKnowledgeSession session = kbase.newStatefulKnowledgeSession();</span></font></p>

<p><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Product p = </span></font><b><font color="#7f0055" face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(127, 0, 85); font-weight: bold;">new</span></font></b><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> Product();</span></font></p>



<p><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; p.setBrand(</span></font><font color="#2a00ff" face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(42, 0, 255);">&quot;hoover&quot;</span></font><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">);</span></font></p>



<p><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="background: silver none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">session</span>.insert( p );</span></font></p>



<p><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></font><b><font color="#7f0055" face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(127, 0, 85); font-weight: bold;">int</span></font></b><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> u = <span style="background: silver none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">session</span>.fireAllRules();</span></font></p>



<p><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></font></p>

<p><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.</span></font><i><font color="#0000c0" face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 0, 192); font-style: italic;">out</span></font></i><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">.println(u + </span></font><font color="#2a00ff" face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(42, 0, 255);">&quot; many rules fired&quot;</span></font><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">);</span></font></p>



<p><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
System.</span></font><i><font color="#0000c0" face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 0, 192); font-style: italic;">out</span></font></i><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">.println(</span></font><font color="#2a00ff" face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(42, 0, 255);">&quot;is brand good? &quot;</span></font><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> + p.isGoodBrand());</span></font></p>



<p><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">&nbsp;</span></font></p>

<p><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">Here&#39;s a
snippet of the rule (decision table)</span></font></p>

<p><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">&nbsp;</span></font></p>

<p><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">&nbsp;</span></font></p>

<table style="width: 327pt; border-collapse: collapse;" border="0" cellpadding="0" cellspacing="0" width="436">
 <tbody><tr style="height: 12.75pt;" height="17">
  <td style="border: 1pt solid black; padding: 0in 5.4pt; background: silver none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; width: 125pt; height: 12.75pt;" bgcolor="silver" height="17" nowrap valign="bottom" width="167">


  <p><b><font face="Tahoma" size="1"><span style="font-size: 7pt; font-family: Tahoma; font-weight: bold;">&nbsp;</span></font></b></p>
  </td>
  <td style="border-style: solid solid solid none; border-color: black black black -moz-use-text-color; border-width: 1pt 1pt 1pt medium; padding: 0in 5.4pt; background: rgb(255, 204, 153) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; width: 85pt; height: 12.75pt;" bgcolor="#ffcc99" height="17" nowrap valign="bottom" width="113">


  <p><font face="Tahoma" size="1"><span style="font-size: 7pt; font-family: Tahoma;">CONDITION</span></font></p>
  </td>
  <td style="border-style: solid solid solid none; border-color: black black black -moz-use-text-color; border-width: 1pt 1pt 1pt medium; padding: 0in 5.4pt; background: rgb(255, 204, 153) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; width: 117pt; height: 12.75pt;" bgcolor="#ffcc99" height="17" nowrap valign="bottom" width="156">


  <p><font face="Tahoma" size="1"><span style="font-size: 7pt; font-family: Tahoma;">ACTION</span></font></p>
  </td>
 </tr>
 <tr style="height: 13.5pt;" height="18">
  <td style="border-style: none solid solid; border-color: -moz-use-text-color black black; border-width: medium 1pt 1pt; padding: 0in 5.4pt; background: silver none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; width: 125pt; height: 13.5pt;" bgcolor="silver" height="18" nowrap valign="bottom" width="167">


  <p><b><font face="Tahoma" size="1"><span style="font-size: 7pt; font-family: Tahoma; font-weight: bold;">&nbsp;</span></font></b></p>
  </td>
  <td colspan="2" style="border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; background: rgb(255, 204, 153) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; width: 202pt; height: 13.5pt;" bgcolor="#ffcc99" height="18" nowrap valign="bottom" width="269">


  <p><font face="Tahoma" size="1"><span style="font-size: 7pt; font-family: Tahoma;">Product</span></font></p>
  </td>
 </tr>
 <tr style="height: 12.75pt;" height="17">
  <td style="border-style: none solid; border-color: -moz-use-text-color black; border-width: medium 1pt; padding: 0in 5.4pt; background: silver none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; width: 125pt; height: 12.75pt;" bgcolor="silver" height="17" valign="bottom" width="167">


  <p><b><font face="Tahoma" size="1"><span style="font-size: 7pt; font-family: Tahoma; font-weight: bold;">&nbsp;</span></font></b></p>
  </td>
  <td style="border-style: none solid none none; border-color: -moz-use-text-color black -moz-use-text-color -moz-use-text-color; border-width: medium 1pt medium medium; padding: 0in 5.4pt; background: rgb(255, 204, 153) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; width: 85pt; height: 12.75pt;" bgcolor="#ffcc99" height="17" valign="bottom" width="113">


  <p><font face="Tahoma" size="1"><span style="font-size: 7pt; font-family: Tahoma;">brand</span></font></p>
  </td>
  <td style="border-style: none solid none none; border-color: -moz-use-text-color black -moz-use-text-color -moz-use-text-color; border-width: medium 1pt medium medium; padding: 0in 5.4pt; background: rgb(255, 204, 153) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; width: 117pt; height: 12.75pt;" bgcolor="#ffcc99" height="17" valign="bottom" width="156">


  <p><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">setGoodBrand(true);</span></font></p>
  </td>
 </tr>
 <tr style="height: 28.5pt;" height="38">
  <td style="border-style: solid solid none; border-color: black black -moz-use-text-color; border-width: 1pt 1pt medium; padding: 0in 5.4pt; background: rgb(204, 255, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; width: 125pt; height: 28.5pt;" bgcolor="#ccffcc" height="38" width="167">


  <p style="text-align: center;" align="center"><b><font face="Tahoma" size="1"><span style="font-size: 7pt; font-family: Tahoma; font-weight: bold;">Cases</span></font></b></p>
  </td>
  <td style="padding: 0in 5.4pt; background: rgb(204, 255, 255) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; width: 85pt; height: 28.5pt;" bgcolor="#ccffff" height="38" valign="bottom" width="113">


  <p><font face="Tahoma" size="1"><span style="font-size: 7pt; font-family: Tahoma;">hoover match case</span></font></p>
  </td>
  <td style="padding: 0in 5.4pt; background: rgb(255, 255, 153) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; width: 117pt; height: 28.5pt;" bgcolor="#ffff99" height="38" valign="bottom" width="156">


  <p><font face="Tahoma" size="1"><span style="font-size: 7pt; font-family: Tahoma;">&nbsp;</span></font></p>
  </td>
 </tr>
 <tr style="height: 21.75pt;" height="29">
  <td style="padding: 0in 5.4pt; width: 125pt; height: 21.75pt;" height="29" width="167">
  <p style="text-align: center;" align="center"><b><font color="black" face="Tahoma" size="1"><span style="font-size: 7pt; font-family: Tahoma; color: black; font-weight: bold;">Brand Check</span></font></b></p>
  </td>
  <td style="padding: 0in 5.4pt; width: 85pt; height: 21.75pt;" height="29" nowrap width="113">
  <p style="text-align: center;" align="center"><font face="Tahoma" size="1"><span style="font-size: 7pt; font-family: Tahoma;">hoover</span></font></p>
  </td>
  <td style="padding: 0in 5.4pt; width: 117pt; height: 21.75pt;" height="29" nowrap width="156">
  <p style="text-align: center;" align="center"><b><font face="Tahoma" size="1"><span style="font-size: 7pt; font-family: Tahoma; font-weight: bold;">&nbsp;</span></font></b></p>
  </td>
 </tr>
</tbody></table>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">And the console returns:</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;</span></font></p>

<p><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">1 many rules fired</span></font></p>

<p><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">is brand good? false</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;</span></font></p>

<div>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">Robert Costello</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">Lead Systems Engineer</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">IMA Performance</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">E3-&nbsp;279A</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">847.286.0910</span></font></p>

<p><font color="navy" face="Times New Roman" size="3"><span style="font-size: 12pt; color: navy;">&nbsp;</span></font></p>

<p><font color="navy" face="Times New Roman" size="3"><span style="font-size: 12pt; color: navy;">&nbsp;</span></font></p>

</div><div><div></div><div>

<p style="margin-left: 0.5in;"><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">-----Original Message-----<br>
<b><span style="font-weight: bold;">From:</span></b> <a href="mailto:rules-users-bounces@lists.jboss.org" target="_blank">rules-users-bounces@lists.jboss.org</a>
[mailto:<a href="mailto:rules-users-bounces@lists.jboss.org" target="_blank">rules-users-bounces@lists.jboss.org</a>] <b><span style="font-weight: bold;">On
Behalf Of </span></b>Edson Tirelli<br>
<b><span style="font-weight: bold;">Sent:</span></b> Monday, January 12, 2009
4:16 PM<br>
<b><span style="font-weight: bold;">To:</span></b> </span></font><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">Rules Users List</span></font><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;"><br>


<b><span style="font-weight: bold;">Subject:</span></b> Re: [rules-users] How to
access data after rule fires</span></font></p>

<p style="margin-left: 0.5in;"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">&nbsp;</span></font></p>

<p style="margin-right: 0in; margin-bottom: 12pt; margin-left: 0.5in;"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"><br>
&nbsp;&nbsp; Can&#39;t you keep the reference to your object while firing the
rules?<br>
<br>
MyObject x = ...<br>
ksession.insert( x );<br>
ksession.fireAllRules();<br>
boolean result = x.getBooleanAttribute();<br>
<br>
&nbsp;&nbsp;&nbsp; []s<br>
&nbsp;&nbsp;&nbsp; Edson</span></font></p>

<div>

<p style="margin-left: 0.5in;"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">2009/1/12 Costello, Robert &lt;<a href="mailto:rcost10@searshc.com" target="_blank">rcost10@searshc.com</a>&gt;</span></font></p>



<p style="margin-left: 0.5in;"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">So, how do I access data after the rules fire?<br>
<br>
If one has a rule which modifies a field on an object (a boolean, for<br>
example), and you want to return the object after the rules are<br>
complete, how do you do it?<br>
<br>
I tried this using a StatefulKnowledgeSession, getting an object<br>
collection after the rules fire, but I don&#39;t see that this works.<br>
<br>
Also googled the heck out of this and looked in all the documentation.<br>
I must be missing something, because the docs generally are pretty good.<br>
<br>
<br>
Any hints?<br>
<br>
Thanks in advance,<br>
<br>
Robert Costello<br>
<br>
<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a></span></font></p>

</div>

<p style="margin-left: 0.5in;"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"><br>
<br clear="all">
<br>
-- <br>
&nbsp;Edson Tirelli<br>
&nbsp;JBoss Drools Core Development<br>
&nbsp;JBoss, a division of Red Hat @ <a href="http://www.jboss.com" target="_blank">www.jboss.com</a></span></font></p>

</div></div></div>

</div>


<br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br> &nbsp;Edson Tirelli<br> &nbsp;JBoss Drools Core Development<br> &nbsp;JBoss, a division of Red Hat @ <a href="http://www.jboss.com" target="_blank">www.jboss.com</a><br>
</div></div><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" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Steven Williams<br><br>Supervising Consultant<br><br>Object Consulting<br>Office: 8615 4500 Mob: 0439 898 668 Fax: 8615 4501<br><a href="mailto:steven.williams@objectconsulting.com.au">steven.williams@objectconsulting.com.au</a><br>
<a href="http://www.objectconsulting.com.au">www.objectconsulting.com.au</a><br><br>consulting | development | training | support<br>our experience makes the difference<br>