<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>
Thanks a lot, I will try this.<br><br><blockquote><hr>From: maheshgadgil@hotmail.com<br>To: rules-users@lists.jboss.org<br>Subject: RE: [rules-users] decision tables and attributes as parameters in        function calls<br>Date: Mon, 7 Apr 2008 14:31:49 +0000<br><br>
<meta http-equiv="Content-Type" content="text/html; charset=unicode">
<meta name="Generator" content="Microsoft SafeHTML">
<style>
.ExternalClass .EC_hmmessage P
{padding:0px;}
.ExternalClass body.EC_hmmessage
{font-size:10pt;font-family:Tahoma;}
</style>
Jonathan,<br>
<br>
The decision table mandates atleast one condition. I have faced this problem before. Assuming you always have some +ve value for cheese.price, do you want to try following?<br>
<br>
<br>
<br>
<table style="width: 302pt; border-collapse: collapse;" border="0" cellpadding="0" cellspacing="0" width="402">
<colgroup>
<col style="width: 98pt;" width="130">
<col style="width: 87pt;" width="116">
<col style="width: 117pt;" width="156">
</colgroup><tbody>
<tr style="height: 12.75pt;" height="17">
<td style="border: medium none rgb(212, 208, 200); width: 98pt; height: 12.75pt; background-color: transparent;" height="17" width="130"><font color="#000000" face="Arial">RuleSet</font></td>
<td style="border: medium none rgb(212, 208, 200); width: 87pt; background-color: transparent;" width="116"><font color="#000000" face="Arial">Cheese rules</font></td>
<td style="border: medium none rgb(212, 208, 200); width: 117pt; background-color: transparent;" width="156"><font color="#000000" face="Arial"></font><br></td></tr>
<tr style="height: 12.75pt;" height="17">
<td style="border: medium none rgb(212, 208, 200); height: 12.75pt; background-color: transparent;" height="17"><font color="#000000" face="Arial">Import</font></td>
<td style="border: medium none rgb(212, 208, 200); background-color: transparent;" colspan="2"><font color="#000000" face="Arial">com.xxx.entity.Cheese</font></td></tr>
<tr style="height: 12.75pt;" height="17">
<td style="border: medium none rgb(212, 208, 200); height: 12.75pt; background-color: transparent;" height="17"><font color="#000000" face="Arial">Variables</font></td>
<td style="border: medium none rgb(212, 208, 200); background-color: transparent;"><font color="#000000" face="Arial"></font><br></td>
<td style="border: medium none rgb(212, 208, 200); background-color: transparent;"><font color="#000000" face="Arial"></font><br></td></tr>
<tr style="height: 12.75pt;" height="17">
<td style="border: medium none rgb(212, 208, 200); height: 12.75pt; background-color: transparent;" height="17"><font color="#000000" face="Arial">Sequential</font></td>
<td style="border: medium none rgb(212, 208, 200); background-color: transparent;" align="center"><font color="#000000" face="Arial">TRUE</font></td>
<td style="border: medium none rgb(212, 208, 200); background-color: transparent;"><font color="#000000" face="Arial"></font><br></td></tr>
<tr style="height: 12.75pt;" height="17">
<td style="border: medium none rgb(212, 208, 200); height: 12.75pt; background-color: transparent;" height="17"><font color="#000000" face="Arial"></font><br></td>
<td style="border: medium none rgb(212, 208, 200); background-color: transparent;"><font color="#000000" face="Arial"></font><br></td>
<td style="border: medium none rgb(212, 208, 200); background-color: transparent;"><font color="#000000" face="Arial"></font><br></td></tr>
<tr style="height: 12.75pt;" height="17">
<td style="border: medium none rgb(212, 208, 200); height: 12.75pt; background-color: transparent;" colspan="2" height="17"><font color="#000000" face="Arial">RuleTable Rules for Cheese</font></td>
<td style="border: medium none rgb(212, 208, 200); background-color: transparent;"><font color="#000000" face="Arial"></font><br></td></tr>
<tr style="height: 12.75pt;" height="17">
<td style="border: medium none rgb(212, 208, 200); height: 12.75pt; background-color: transparent;" height="17"><font color="#000000" face="Arial">CONDITION</font></td>
<td style="border: medium none rgb(212, 208, 200); background-color: transparent;"><font color="#000000" face="Arial">ACTION</font></td>
<td style="border: medium none rgb(212, 208, 200); background-color: transparent;"><font color="#000000" face="Arial"></font><br></td></tr>
<tr style="height: 12.75pt;" height="17">
<td style="border: medium none rgb(212, 208, 200); height: 12.75pt; background-color: transparent;" height="17"><font color="#000000" face="Arial">$c : Cheese</font></td>
<td style="border: medium none rgb(212, 208, 200); background-color: transparent;"><font color="#000000" face="Arial">$c</font></td>
<td style="border: medium none rgb(212, 208, 200); background-color: transparent;"><font color="#000000" face="Arial"></font><br></td></tr>
<tr style="height: 12.75pt;" height="17">
<td style="border: medium none rgb(212, 208, 200); height: 12.75pt; background-color: transparent;" height="17"><font color="#000000" face="Arial">$price : price ></font></td>
<td style="border: medium none rgb(212, 208, 200); background-color: transparent;" colspan="2"><font color="#000000" face="Arial">setPrice($price * $1)</font></td></tr>
<tr style="height: 12.75pt;" height="17">
<td style="border: medium none rgb(212, 208, 200); height: 12.75pt; background-color: transparent;" height="17"><font color="#000000" face="Arial"></font><br></td>
<td style="border: medium none rgb(212, 208, 200); background-color: transparent;"><font color="#000000" face="Arial"></font><br></td>
<td style="border: medium none rgb(212, 208, 200); background-color: transparent;"><font color="#000000" face="Arial"></font><br></td></tr>
<tr style="height: 12.75pt;" height="17">
<td style="border: medium none rgb(212, 208, 200); height: 12.75pt; background-color: transparent;" align="right" height="17"><font color="#000000" face="Arial">0</font></td>
<td style="border: medium none rgb(212, 208, 200); background-color: transparent;" align="right"><font color="#000000" face="Arial">2</font></td>
<td style="border: medium none rgb(212, 208, 200); background-color: transparent;"><br></td></tr></tbody></table><br><br><br>
Thanks<br>
mahesh<br>
<blockquote>
<hr>
From: jojolemariole@hotmail.com<br>To: rules-users@lists.jboss.org<br>Date: Mon, 7 Apr 2008 08:56:34 +0000<br>Subject: [rules-users] decision tables and attributes as parameters in function calls<br><br>
<style>
.ExternalClass .EC_hmmessage P
{padding:0px;}
.ExternalClass body.EC_hmmessage
{font-size:10pt;font-family:Tahoma;}
</style>
<br>
<div class="EC_EC_ExternalClass" id="EC_EC_MsgContainer">
<style>
.ExternalClass .EC_hmmessage P
{padding:0px;}
.ExternalClass body.EC_hmmessage
{font-size:10pt;font-family:Tahoma;}
</style>
hi,<br><br><pre class="EC_EC_EC_programlisting"><span style="font-family: Tahoma,Helvetica,Sans-Serif;">I have no problem for this kind of rule :<br><br></span>rule "Primitive support"<br>when<br> $c : Cheese( price < 10 )<br>then<br> $c.setPrice( 10 )<br>end <br></pre>but I would like to know what is the decision table for this small rule<br><br><pre class="EC_EC_EC_programlisting">rule "Primitive support"<br>when<br> $c : Cheese( $price : price )<br>then<br> $c.setPrice( $price * 2 )<br>end<br><br><span style="font-family: Tahoma,Helvetica,Sans-Serif;">I've tried a lot of syntax and I read the section abour the decision table in the manual but i</span><br style="font-family: Tahoma,Helvetica,Sans-Serif;"><span style="font-family: Tahoma,Helvetica,Sans-Serif;">didnt find anything.</span></pre></div><br>
<hr>
Centralisez tous vos comptes mails dans Hotmail ! <a href="http://www.windowslive.fr/hotmail/" target="_blank">Créez un compte Hotmail, c'est gratuit !</a> </blockquote><br><hr>Exclusive Marriage Proposals!
Find UR life partner at Shaadi.com <a href="http://ss1.richmedia.in/recurl.asp?pid=430" target="_blank">Try it!</a>
</blockquote><br /><hr />Discutez gratuitement avec vos amis en vidéo ! <a href='http://www.windowslive.fr/messenger/' target='_new'>Téléchargez Messenger, c'est gratuit !</a></body>
</html>