<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I tried copying a project with a working ruleflow group and it still doesn't work :s. In the audit view I get the following:<div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><img height="133" width="763" apple-width="yes" apple-height="yes" src="cid:1E3EBDB4-08F5-478C-A71D-0568954040FE"></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">So I think my rule is triggered. But I don't get the system.out.println. The flow contains an action, followed by a ruleflowgroup and another action. I get the following result in the console:</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">1241555272170340000</div><div><br></div></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">(which is the result of the first action)</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">I removed all doubles, so the problem can't be that.&nbsp;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(128, 128, 0); ">#created on: 1-feb-2009</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span style="color: #960000">package</span> masterproef.rules</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; min-height: 15px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span style="color: #960000">import</span> masterproef.rulerunner.BMIClass;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; min-height: 15px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(0, 128, 0); "><span style="color: #960000">rule</span><span style="color: #000000"> </span>"Overgewicht"</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(0, 128, 0); "><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">        </span></span><span style="color: #960000">ruleflow-group</span><span style="color: #000000"> </span>"Check Temperature"</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(150, 0, 0); "><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">        </span></span>when</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre">                </span>bmiClass : BMIClass(bmi &gt;= 25, bmi &lt; 30)</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(150, 0, 0); "><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">        </span></span>then</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre">                </span>System.out.println(bmiClass + <span style="color: #008000">"\t U heeft overgewicht"</span>);&nbsp;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(150, 0, 0); ">end</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; min-height: 15px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(0, 128, 0); "><span style="color: #960000">rule</span><span style="color: #000000"> </span>"Obesitas"</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(0, 128, 0); "><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">        </span></span><span style="color: #960000">ruleflow-group</span><span style="color: #000000"> </span>"Check Temperature"</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(150, 0, 0); "><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">        </span></span>when</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre">                </span>bmiClass : BMIClass($bmi : bmi &gt;= 30)</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(150, 0, 0); "><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">        </span></span>then</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre">                </span>System.out.println(bmiClass + <span style="color: #008000">"\t U heeft obesitas"</span>);</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(150, 0, 0); ">end</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; min-height: 15px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(0, 128, 0); "><span style="color: #960000">rule</span><span style="color: #000000"> </span>"Ondergewicht"</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(0, 128, 0); "><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">        </span></span><span style="color: #960000">ruleflow-group</span><span style="color: #000000"> </span>"Check Temperature"</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(150, 0, 0); "><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">        </span></span>when</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre">                </span>bmiClass : BMIClass($bmi : bmi &lt; 18)</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(150, 0, 0); "><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">        </span></span>then</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre">                </span>System.out.println(bmiClass + <span style="color: #008000">"\t U heeft ondergewicht"</span>);</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(150, 0, 0); ">end</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; min-height: 15px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(0, 128, 0); "><span style="color: #960000">rule</span><span style="color: #000000"> </span>"Normaal"</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(0, 128, 0); "><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">        </span></span><span style="color: #960000">ruleflow-group</span><span style="color: #000000"> </span>"Check Temperature"</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(150, 0, 0); "><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">        </span></span>when</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre">                </span>bmiClass : BMIClass(bmi &gt;= 18, bmi &lt; 25)</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(150, 0, 0); "><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">        </span></span>then</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre">                </span>System.out.println(bmiClass + <span style="color: #008000">"\t U heeft een normaal gewicht"</span>);</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(150, 0, 0); ">end<span style="color: #000000">&nbsp;</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(150, 0, 0); "><font class="Apple-style-span" color="#000000"><br></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(150, 0, 0); "><font class="Apple-style-span" color="#000000">Anyone any ideas?</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(150, 0, 0); "><font class="Apple-style-span" color="#000000"><br></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(150, 0, 0); "><font class="Apple-style-span" color="#000000">Femke</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(150, 0, 0); "><font class="Apple-style-span" color="#000000"><br></font></div></div><div><div>Op 5-mei-09, om 08:00 heeft Wolfgang Laun het volgende geschreven:</div><br class="Apple-interchange-newline"><blockquote type="cite">One thing you ought to observe is a strict textual identity of all literals. So, the limit "thirty-point-zero" shouldn't be written as "30.0" in one place and "30" in another if a seamless or non-overlapping set of intervals [x,30[ and [30,y] is desired.<br> <br>(There ought to <a href="http://s.th">s.th</a>. like "const" or "final static" in DRL so you could create named constants. As it is, one might import them from a Java class.)<br><br>Also, avoid conversions from int to double at different times, i.e., compile time vs. runtime, or similar.<br> <br>All of this isn't a peculiarity of Drools - it's the general "blessing" that comes with floating point. <br><br>BTW, I recall vaguely that your Java code creates another session for each insert of a BMIClass fact in the 10000 loop. As you are comparing execution speeds, it isn't fair to include this start-up call in the evaluation of rule firing. <br> <br>-W<br><br><br><div class="gmail_quote">2009/5/4 Femke De Backere <span dir="ltr">&lt;<a href="mailto:femmyke@gmail.com">femmyke@gmail.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 style="">I solved the problem by removing every double in the sample.drl. How van I fix the double problem if I really wanted to :)? In this case it is unnecassary but there must be a solution?<div><br></div><div>Thanks for all the help!</div> <div><div></div><div class="h5"><div><br></div><div>Femke</div><div><br><div><div>Op 4-mei-09, om 21:48 heeft Wolfgang Laun het volgende geschreven:</div><br><blockquote type="cite">Don't use doubles. Try the same thing, scaling the random weights with 10 (or 100) convert to int, and use suitably scaled integer limits for your weight classes.<br> <br>I'm not at all sure, what various JVM versions and/or Rand generators could produce. <br> <br>The javadoc for java.lang.Math is an indicator that things might not be as simple as they ought to be.<br><br>I could reproduce the problem this afternoon, but now I can't any more, on the same machine, same JVM and same Drools version. <br> <br>-W<br><br><br><div class="gmail_quote">2009/5/4 Femke De Backere <span dir="ltr">&lt;<a href="mailto:femmyke@gmail.com" target="_blank">femmyke@gmail.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>So, I did as you suggested, with the following as result:<div><div style="margin: 0px;">BMI of 10 U heeft ondergewicht: 10</div><div style="margin: 0px;">BMI of 30 U heeft ondergewicht: 30</div><div style="margin: 0px;"> BMI of 30 U heeft obesitas: 30</div><div style="margin: 0px;">BMI of 20 U heeft ondergewicht: 20</div><div style="margin: 0px;"><br></div><div style="margin: 0px;">So, I really don't get it, I used exactly the same code as you.</div> <div style="margin: 0px;"><br></div><div style="margin: 0px;">Femke</div><div style="margin: 0px;"><br></div><div><div>Op 4-mei-09, om 17:11 heeft Greg Barton het volgende geschreven:</div><br><blockquote type="cite"><div> <br>Well, approach this systematically, then: Create a new Drools project in Eclipse and replace the DroolsTest.java and Sample.drl with the ones I sent before. &nbsp;What results do you get? &nbsp;If they are correct, modify the project one step at a time until the problem is uncovered.<br> <br>One place to focus on: you're using rule flows. &nbsp;I have no idea how that could cause a false positive result like you've seen, but you never know.<br><br>Finally, if you're comparing performance of rules vs plain java, plain java will easily win in this case. &nbsp;The rule of thumb is this: if you can easily write a plain non-rules algorithm it will outperform the rules solution. <br> <br>--- On Mon, 5/4/09, Femke De Backere &lt;<a href="mailto:femmyke@gmail.com" target="_blank">femmyke@gmail.com</a>&gt; wrote:<br><br><blockquote type="cite">From: Femke De Backere &lt;<a href="mailto:femmyke@gmail.com" target="_blank">femmyke@gmail.com</a>&gt;<br> </blockquote><blockquote type="cite">Subject: Re: [rules-users] Rule problem<br></blockquote><blockquote type="cite">To: "Rules Users List" &lt;<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a>&gt;<br> </blockquote><blockquote type="cite">Date: Monday, May 4, 2009, 6:53 AM<br></blockquote><blockquote type="cite">I'm using this:<br></blockquote><blockquote type="cite">package bmi<br></blockquote><blockquote type="cite"> <br></blockquote><blockquote type="cite">import bmi.DroolsTest.BMIClass;<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">rule "Overgewicht"<br></blockquote><blockquote type="cite"> <span style="white-space: pre;">        </span>ruleflow-group "BMIrules"<br></blockquote><blockquote type="cite"><span style="white-space: pre;">        </span>when<br></blockquote><blockquote type="cite"><span style="white-space: pre;">        </span><span style="white-space: pre;">        </span>bmiClass : BMIClass($bmi: bmi &gt;= 25, bmi &lt; 30)<br> </blockquote><blockquote type="cite"><span style="white-space: pre;">        </span>then<br></blockquote><blockquote type="cite"><span style="white-space: pre;">        </span><span style="white-space: pre;">        </span>System.out.println("U heeft overgewicht: " +<br> </blockquote><blockquote type="cite">$bmi);<br></blockquote><blockquote type="cite">end<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">rule "Obesitas"<br></blockquote><blockquote type="cite"> <span style="white-space: pre;">        </span>ruleflow-group "BMIrules"<br></blockquote><blockquote type="cite"><span style="white-space: pre;">        </span>when<br></blockquote><blockquote type="cite"><span style="white-space: pre;">        </span><span style="white-space: pre;">        </span>bmiClass : BMIClass($bmi : bmi &gt;= 30)<br> </blockquote><blockquote type="cite"><span style="white-space: pre;">        </span>then<br></blockquote><blockquote type="cite"><span style="white-space: pre;">        </span><span style="white-space: pre;">        </span>System.out.println("U heeft obesitas: " +<br> </blockquote><blockquote type="cite">$bmi);<br></blockquote><blockquote type="cite">end<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">rule "Ondergewicht"<br> </blockquote><blockquote type="cite"><span style="white-space: pre;">        </span>ruleflow-group "BMIrules"<br></blockquote><blockquote type="cite"><span style="white-space: pre;">        </span>when<br></blockquote><blockquote type="cite"> <span style="white-space: pre;">        </span><span style="white-space: pre;">        </span>bmiClass : BMIClass($bmi : bmi &lt; 18.5)<br></blockquote><blockquote type="cite"><span style="white-space: pre;">        </span>then<br></blockquote> <blockquote type="cite"><span style="white-space: pre;">        </span><span style="white-space: pre;">        </span>System.out.println("U heeft ondergewicht: " +<br></blockquote><blockquote type="cite">$bmi);<br></blockquote> <blockquote type="cite">end<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">rule "Normaal"<br></blockquote><blockquote type="cite"><span style="white-space: pre;">        </span>ruleflow-group "BMIrules"<br> </blockquote><blockquote type="cite"><span style="white-space: pre;">        </span>when<br></blockquote><blockquote type="cite"><span style="white-space: pre;">        </span><span style="white-space: pre;">        </span>bmiClass : BMIClass($bmi : bmi &gt;= 18.5, bmi &lt; 25)<br> </blockquote><blockquote type="cite"><span style="white-space: pre;">        </span>then<br></blockquote><blockquote type="cite"><span style="white-space: pre;">        </span><span style="white-space: pre;">        </span>System.out.println("U heeft een normaal gewicht:<br> </blockquote><blockquote type="cite">" + $bmi);<br></blockquote><blockquote type="cite">end<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">But in essence it is the same as Greg's. I get outputs<br> </blockquote><blockquote type="cite">as:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">U heeft ondergewicht: 25.0<br></blockquote><blockquote type="cite">U heeft overgewicht: 25.0<br></blockquote> <blockquote type="cite"><br></blockquote><blockquote type="cite">But I really don't see the problem.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Femke<br></blockquote><blockquote type="cite"> <br></blockquote><blockquote type="cite">Op 4-mei-09, om 13:25 heeft Wolfgang Laun het volgende<br></blockquote><blockquote type="cite">geschreven:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> <blockquote type="cite">I cannot reproduce your findings.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Which bmi values cause the firing of two rules?<br></blockquote></blockquote><blockquote type="cite"> <blockquote type="cite">Are you using exactly the same .drl file Greg sent?<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">-W<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> <br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">2009/5/4 Femke De Backere &lt;<a href="mailto:femmyke@gmail.com" target="_blank">femmyke@gmail.com</a>&gt;<br></blockquote></blockquote><blockquote type="cite"> <blockquote type="cite">Thanks for the answer! But I sometimes get 2 rules<br></blockquote></blockquote><blockquote type="cite">that are correct, &nbsp;<br></blockquote><blockquote type="cite"><blockquote type="cite">and that is impossible. I embedded Greg's<br> </blockquote></blockquote><blockquote type="cite">DroolsTest class in my &nbsp;<br></blockquote><blockquote type="cite"><blockquote type="cite">class (I am doing some test on performance and<br></blockquote></blockquote><blockquote type="cite"> studying the &nbsp;<br></blockquote><blockquote type="cite"><blockquote type="cite">difference between performance with a plain java<br></blockquote></blockquote><blockquote type="cite">class), and it &nbsp;<br></blockquote><blockquote type="cite"> <blockquote type="cite">still doesn't work, and I really don't see<br></blockquote></blockquote><blockquote type="cite">why. Anyone any &nbsp;<br></blockquote><blockquote type="cite"><blockquote type="cite">suggestions, in attachement, my class.<br> </blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Thx,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> <br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Femke<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> <br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> Op 4-mei-09, om 02:47 heeft Greg Barton het volgende<br></blockquote></blockquote><blockquote type="cite">geschreven:<br></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"> <blockquote type="cite">Try the attached code.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">--- On Sun, 5/3/09, Femke De Backere<br> </blockquote></blockquote><blockquote type="cite">&lt;<a href="mailto:femmyke@gmail.com" target="_blank">femmyke@gmail.com</a>&gt; wrote:<br></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote> <blockquote type="cite"><blockquote type="cite">From: Femke De Backere &lt;<a href="mailto:femmyke@gmail.com" target="_blank">femmyke@gmail.com</a>&gt;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> Subject: Re: [rules-users] Rule problem<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">To: "Rules Users List"<br></blockquote></blockquote><blockquote type="cite">&lt;<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a>&gt;<br> </blockquote><blockquote type="cite"><blockquote type="cite">Date: Sunday, May 3, 2009, 6:18 PM<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Thx for the answer. I tried this but I doesn't<br> </blockquote></blockquote><blockquote type="cite">seem to<br></blockquote><blockquote type="cite"><blockquote type="cite">work. For a BMI of 20, i get the result<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> "ondergewicht", and it should be<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">"normal".<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br> </blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Op 4-mei-09, om 01:04 heeft Ingomar Otter het volgende<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">geschreven:<br> </blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Femke,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> The "Overgewicht| rule matches for _two_ BMIClass<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">facts, one with bmi &gt;- 25 and one for BMIClass<br></blockquote></blockquote><blockquote type="cite"> &lt;30.<br></blockquote><blockquote type="cite"><blockquote type="cite">If you want to apply multiple &nbsp;constraints to a single<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">fact you have to list them as such:<br> </blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">rule "Overgewicht"<br></blockquote></blockquote><blockquote type="cite"> <blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;when<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bmiClass : BMIClass(bmi &gt;= 25<br></blockquote></blockquote><blockquote type="cite">&amp;&amp; bmi<br> </blockquote><blockquote type="cite"><blockquote type="cite">&lt;30)<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;then<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.out.println("U heeft<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">overgewicht");<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> end<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> Cheers,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Ingomar<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"> <blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Am 04.05.2009 um 00:48 schrieb Femke De Backere:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> <br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Hi!<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> I want to make en BMI rule application, so I need<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">to test the BMI values. But in rule<br></blockquote></blockquote><blockquote type="cite">"Overgewicht"<br> </blockquote><blockquote type="cite"><blockquote type="cite">and "Normaal", I need to use an AND, but it<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">doesn't seem to work in any way I tried.<br> </blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Does anybody see the problem? The rest of the<br></blockquote></blockquote> <blockquote type="cite"><blockquote type="cite">application is based on de sample project (created<br></blockquote></blockquote><blockquote type="cite">when<br></blockquote><blockquote type="cite"><blockquote type="cite"> making a new Drools project).<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Thx,<br></blockquote></blockquote><blockquote type="cite"> <blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Femke<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"> <blockquote type="cite">package bmi<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">import bmi.DroolsTest.BMIClass;<br> </blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">rule "Overgewicht"<br></blockquote></blockquote><blockquote type="cite"> <blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;when<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bmiClass : BMIClass(bmi &gt;= 25)<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bmiClass : BMIClass(bmi &lt; 30)<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;then<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.out.println("U heeft<br> </blockquote></blockquote><blockquote type="cite"><blockquote type="cite">overgewicht");<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">end<br></blockquote></blockquote><blockquote type="cite"> <blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">rule "Obesitas"<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;when<br> </blockquote> </blockquote><blockquote type="cite"><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bmiClass : BMIClass($bmi : bmi &gt;=<br></blockquote></blockquote><blockquote type="cite">30)<br></blockquote><blockquote type="cite"> <blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;then<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.out.println("U heeft<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> obesitas");<br> </blockquote></blockquote><blockquote type="cite"><blockquote type="cite">end<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"> <blockquote type="cite"> rule "Ondergewicht"<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;when<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bmiClass : BMIClass($bmi : bmi &lt;<br> </blockquote></blockquote><blockquote type="cite">18.5)<br></blockquote><blockquote type="cite"><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;then<br></blockquote></blockquote><blockquote type="cite"> <blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.out.println("U heeft<br> </blockquote></blockquote><blockquote type="cite"><blockquote type="cite">ondergewicht");<br></blockquote></blockquote><blockquote type="cite"> <blockquote type="cite">end<br></blockquote></blockquote><blockquote type="cite"> <blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">rule "Normaal"<br></blockquote> </blockquote><blockquote type="cite"><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;when<br></blockquote> </blockquote><blockquote type="cite"><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bmiClass : BMIClass(bmi &gt;= 18.5)<br></blockquote></blockquote> <blockquote type="cite"><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bmiClass : BMIClass(bmi &lt; 25)<br> </blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;then<br></blockquote></blockquote><blockquote type="cite"> <blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.out.println("U heeft een<br></blockquote> </blockquote><blockquote type="cite">normaal<br></blockquote><blockquote type="cite"><blockquote type="cite">gewicht");<br> </blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote> <blockquote type="cite"><blockquote type="cite">end &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br></blockquote></blockquote><blockquote type="cite"> _______________________________________________<br></blockquote><blockquote type="cite"><blockquote type="cite"> rules-users mailing list<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br> </blockquote></blockquote> <blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br> </blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">_______________________________________________<br></blockquote></blockquote> <blockquote type="cite"><blockquote type="cite">rules-users mailing list<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br> </blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br></blockquote> </blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">_______________________________________________<br></blockquote></blockquote><blockquote type="cite"> <blockquote type="cite">rules-users mailing list<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br> </blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br></blockquote> </blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">&lt;<br> </blockquote></blockquote><blockquote type="cite"><blockquote type="cite">DroolsTest<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite">.java&gt;&lt;Sample.drl&gt;_______________________________________________<br> </blockquote><blockquote type="cite"><blockquote type="cite">rules-users mailing list<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br> </blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br></blockquote> </blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">_______________________________________________<br> </blockquote></blockquote><blockquote type="cite"><blockquote type="cite">rules-users mailing list<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br> </blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br></blockquote> </blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">_______________________________________________<br> </blockquote></blockquote><blockquote type="cite"><blockquote type="cite">rules-users mailing list<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br> </blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br></blockquote> </blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">_______________________________________________<br></blockquote><blockquote type="cite">rules-users mailing list<br></blockquote><blockquote type="cite"> <a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br></blockquote><blockquote type="cite"><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br> </blockquote><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><br> </div></blockquote></div><br></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>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> </blockquote></div><br></div></div></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>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>https://lists.jboss.org/mailman/listinfo/rules-users<br></blockquote></div><br></div></body></html>