You could do it a couple of ways. 3 Rules where the whens look like the following<br><br>when A(Value == 25) then ...<br>when A(Value == 10) then ...<br>when A(Value != 10 && != 25) then...<br><br>Or with salience and control facts<br>
<br>when<br> A(value == 25)<br>then<br> print success;<br> insert(new Found());<br><br>when<br> A(value == 10)<br>then<br> print not bad<br> insert(new Found());<br><br>salience -10<br>when <br>
not (Found())<br>then <br> print try again<br><br><div class="gmail_quote">On Wed, Dec 10, 2008 at 1:51 AM, Ravi Krishnamurthy <span dir="ltr"><<a href="mailto:ravik@savvion.com">ravik@savvion.com</a>></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;">
<div bgcolor="#ffffff" text="#000000">
<font face="Courier New, Courier, monospace">Hello:<br>
1) Is it possible to write any if then else kind of rule instead of
stating all the possibilities in a decision table. <br>
<br>
For example: if a == 25<br>
print (success)<br>
else if a == 10<br>
print (not bad)<br>
else<br>
print (try again)<br>
<br>
Thanks,<br>
Ravi<br>
<br>
<br>
</font>
</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>