<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Stefan,<br>
      5.6 is coming out in a few days.. it will be a major fix release
      where a number of bugs have been isolated<br>
      and corrected. The reason it's not out yet is because more edge
      case errors are being found and <br>
      corrected. I hope that an upgrade to 5.6 will be recommended to
      all 5.5 users<br>
      Davide<br>
      <br>
      On 04/18/2013 09:41 AM, Stefan Schuster wrote:<br>
    </div>
    <blockquote
cite="mid:CAB8MEnrQk-q6ZchcuniCuTF0aAJvHjUw8r5b56fSDYvszHrHaQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div style="">Thanks for all answers.</div>
        <div><br>
        </div>
        Finally I found the ticket for this issue:
        <div><a moz-do-not-send="true"
            href="https://issues.jboss.org/browse/DROOLS-15">https://issues.jboss.org/browse/DROOLS-15</a><br>
        </div>
        <div>
          <p class="" style="">Despite all the great functionality in
            Drools, this bug makes me really afraid. I can live with
            bugs that throw exceptions or even crash the application.
            But simply returning a wrong value is the worst case I can
            imagine for an algorithmic library.</p>
          <p class="" style="">&nbsp;Is this such a special case that it has
            no effect in every days use? I mean, this error occurs when
            starting one of the examples that are part of the release,
            that doesn't sound like a special case to me, isn't it?</p>
          <p class="" style="">Please don't misunderstand me, I have a
            deep respect for the developer of such complex systems like
            DROOLS, and &nbsp;I know from my own code that bugs simply
            happen. But I wonder why there is still this version without
            any warning the official release?&nbsp;</p>
          <p class="" style="">Is it better to use an older version?</p>
          <p class="" style="">best regards</p>
          <p class="" style="">Stefan</p>
          <p class=""><br>
          </p>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">2013/4/18 Mark Proctor <span dir="ltr">&lt;<a
              moz-do-not-send="true" href="mailto:mproctor@codehaus.org"
              target="_blank">mproctor@codehaus.org</a>&gt;</span><br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">There are
            a lot of fixes in the 5.x master. Anyone verified their bugs
            against this? I suspect this is fixed in that.<br>
            <span class="HOEnZb"><font color="#888888"><br>
                <br>
                Mark<br>
              </font></span>
            <div class="HOEnZb">
              <div class="h5">On 18 Apr 2013, at 16:21, Wolfgang Laun
                &lt;<a moz-do-not-send="true"
                  href="mailto:wolfgang.laun@gmail.com">wolfgang.laun@gmail.com</a>&gt;
                wrote:<br>
                <br>
                &gt; Ah, my memory :-)<br>
                &gt;<br>
                &gt; <a moz-do-not-send="true"
href="http://lists.jboss.org/pipermail/rules-dev/2013-January/004338.html"
                  target="_blank">http://lists.jboss.org/pipermail/rules-dev/2013-January/004338.html</a><br>
                &gt;<br>
                &gt; Mark has promised a fix for 3 months ago, but of
                course 5.5.0 remains broken.<br>
                &gt;<br>
                &gt; -W<br>
                &gt;<br>
                &gt; On 18/04/2013, Stefan Schuster &lt;<a
                  moz-do-not-send="true"
                  href="mailto:stefan.m.schuster@gmail.com">stefan.m.schuster@gmail.com</a>&gt;
                wrote:<br>
                &gt;&gt; Hi, thank you for your response.<br>
                &gt;&gt; I'm using the latest stable release of Drools
                5.5.0 final.<br>
                &gt;&gt; Eclipse is Juno Service Release 2.<br>
                &gt;&gt;<br>
                &gt;&gt; Can you confirm, that the order 1,2,3 is the
                expected result?<br>
                &gt;&gt;<br>
                &gt;&gt; If this is a known bug, is there some kind of
                jira or bugzilla numer<br>
                &gt;&gt; assigned to it?<br>
                &gt;&gt;<br>
                &gt;&gt;<br>
                &gt;&gt;<br>
                &gt;&gt; 2013/4/18 Wolfgang Laun &lt;<a
                  moz-do-not-send="true"
                  href="mailto:wolfgang.laun@gmail.com">wolfgang.laun@gmail.com</a>&gt;<br>
                &gt;&gt;<br>
                &gt;&gt;&gt; IIRC, this was a bug one or two minor
                versions ago. What version are you<br>
                &gt;&gt;&gt; using?<br>
                &gt;&gt;&gt; -W<br>
                &gt;&gt;&gt;<br>
                &gt;&gt;&gt; On 18/04/2013, Stefan Schuster &lt;<a
                  moz-do-not-send="true"
                  href="mailto:stefan.m.schuster@gmail.com">stefan.m.schuster@gmail.com</a>&gt;
                wrote:<br>
                &gt;&gt;&gt;&gt; For the sake of &nbsp;completeness, here is
                also the RuleRunner class used<br>
                &gt;&gt;&gt;&gt; in<br>
                &gt;&gt;&gt;&gt; this example:<br>
                &gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt; package org.drools.tutorials.banking;<br>
                &gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt; import java.util.Collection;<br>
                &gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt; import org.drools.KnowledgeBase;<br>
                &gt;&gt;&gt;&gt; import org.drools.KnowledgeBaseFactory;<br>
                &gt;&gt;&gt;&gt; import
                org.drools.builder.KnowledgeBuilder;<br>
                &gt;&gt;&gt;&gt; import
                org.drools.builder.KnowledgeBuilderFactory;<br>
                &gt;&gt;&gt;&gt; import org.drools.builder.ResourceType;<br>
                &gt;&gt;&gt;&gt; import
                org.drools.definition.KnowledgePackage;<br>
                &gt;&gt;&gt;&gt; import org.drools.io.ResourceFactory;<br>
                &gt;&gt;&gt;&gt; import
                org.drools.runtime.StatefulKnowledgeSession;<br>
                &gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt; public class RuleRunner {<br>
                &gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt; &nbsp; &nbsp;public RuleRunner() {<br>
                &gt;&gt;&gt;&gt; &nbsp; &nbsp;}<br>
                &gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt; &nbsp; &nbsp;public void runRules(String[] rules,<br>
                &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Object[] facts)
                {<br>
                &gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;KnowledgeBase kbase =
                KnowledgeBaseFactory.newKnowledgeBase();<br>
                &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;KnowledgeBuilder kbuilder =<br>
                &gt;&gt;&gt;&gt;
                KnowledgeBuilderFactory.newKnowledgeBuilder();<br>
                &gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;for ( int i = 0; i &lt;
                rules.length; i++ ) {<br>
                &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;String ruleFile = rules[i];<br>
                &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;System.out.println( "Loading
                file: " + ruleFile );<br>
                &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;kbuilder.add(
                ResourceFactory.newClassPathResource(<br>
                &gt;&gt;&gt;&gt; ruleFile,<br>
                &gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt; RuleRunner.class ),<br>
                &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                &nbsp;ResourceType.DRL );<br>
                &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;}<br>
                &gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;
                &nbsp;Collection&lt;KnowledgePackage&gt; pkgs =<br>
                &gt;&gt;&gt;&gt; kbuilder.getKnowledgePackages();<br>
                &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;kbase.addKnowledgePackages( pkgs
                );<br>
                &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;StatefulKnowledgeSession
                ksession =<br>
                &gt;&gt;&gt;&gt; kbase.newStatefulKnowledgeSession();<br>
                &gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;for ( int i = 0; i &lt;
                facts.length; i++ ) {<br>
                &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Object fact = facts[i];<br>
                &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;System.out.println(
                "Inserting fact: " + fact );<br>
                &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ksession.insert( fact );<br>
                &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;}<br>
                &gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;ksession.fireAllRules();<br>
                &gt;&gt;&gt;&gt; &nbsp; &nbsp;}<br>
                &gt;&gt;&gt;&gt; }<br>
                &gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt; 2013/4/18 Stefan Schuster &lt;<a
                  moz-do-not-send="true"
                  href="mailto:stefan.m.schuster@gmail.com">stefan.m.schuster@gmail.com</a>&gt;<br>
                &gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt;&gt; Hello,<br>
                &gt;&gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt;&gt; I have a problem with the banking
                tutorial number 3, which is part of<br>
                &gt;&gt;&gt; the<br>
                &gt;&gt;&gt;&gt;&gt; examples of drools expert.<br>
                &gt;&gt;&gt;&gt;&gt; It simply adds some Numbers as
                facts, and retracts them in an<br>
                &gt;&gt;&gt;&gt;&gt; increasing<br>
                &gt;&gt;&gt;&gt;&gt; order.<br>
                &gt;&gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt;&gt; It is very short, therefore I post
                the whole Code:<br>
                &gt;&gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt;&gt; BankingExample3.java<br>
                &gt;&gt;&gt;&gt;&gt;
                _________________________________________________<br>
                &gt;&gt;&gt;&gt;&gt; package
                org.drools.tutorials.banking;<br>
                &gt;&gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt;&gt; public class BankingExample3 {<br>
                &gt;&gt;&gt;&gt;&gt; &nbsp; &nbsp;public static void main(String[]
                args) {<br>
                &gt;&gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;Number[] numbers = new
                Number[] {wrap(3), wrap(1), wrap(4),<br>
                &gt;&gt;&gt;&gt;&gt; wrap(1), wrap(5)};<br>
                &gt;&gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;new RuleRunner().runRules(
                new String[] { "Example3.drl" },<br>
                &gt;&gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                numbers );<br>
                &gt;&gt;&gt;&gt;&gt; &nbsp; &nbsp;}<br>
                &gt;&gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt;&gt; &nbsp; &nbsp;private static Integer wrap(int
                i) {<br>
                &gt;&gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;return new Integer(i);<br>
                &gt;&gt;&gt;&gt;&gt; &nbsp; &nbsp;}<br>
                &gt;&gt;&gt;&gt;&gt; }<br>
                &gt;&gt;&gt;&gt;&gt;
                _________________________________________________<br>
                &gt;&gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt;&gt; Example3.drl:<br>
                &gt;&gt;&gt;&gt;&gt;
                _________________________________________________<br>
                &gt;&gt;&gt;&gt;&gt; package
                org.drools.tutorials.banking<br>
                &gt;&gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt;&gt; rule "Rule 01"<br>
                &gt;&gt;&gt;&gt;&gt; &nbsp; &nbsp;when<br>
                &gt;&gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;$number : Number()<br>
                &gt;&gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;not Number( intValue &lt;
                $number.intValue )<br>
                &gt;&gt;&gt;&gt;&gt; &nbsp; &nbsp;then<br>
                &gt;&gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;System.out.println("Number
                found with value: " +<br>
                &gt;&gt;&gt;&gt;&gt; $number.intValue() );<br>
                &gt;&gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;retract( $number );<br>
                &gt;&gt;&gt;&gt;&gt; end<br>
                &gt;&gt;&gt;&gt;&gt;
                _________________________________________________<br>
                &gt;&gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt;&gt; Output:<br>
                &gt;&gt;&gt;&gt;&gt;
                _________________________________________________<br>
                &gt;&gt;&gt;&gt;&gt; Loading file: Example3.drl<br>
                &gt;&gt;&gt;&gt;&gt; Inserting fact: 3<br>
                &gt;&gt;&gt;&gt;&gt; Inserting fact: 1<br>
                &gt;&gt;&gt;&gt;&gt; Inserting fact: 4<br>
                &gt;&gt;&gt;&gt;&gt; Inserting fact: 1<br>
                &gt;&gt;&gt;&gt;&gt; Inserting fact: 5<br>
                &gt;&gt;&gt;&gt;&gt; Number found with value: 1<br>
                &gt;&gt;&gt;&gt;&gt; Number found with value: 1<br>
                &gt;&gt;&gt;&gt;&gt; Number found with value: 3<br>
                &gt;&gt;&gt;&gt;&gt; Number found with value: 4<br>
                &gt;&gt;&gt;&gt;&gt; Number found with value: 5<br>
                &gt;&gt;&gt;&gt;&gt;
                _________________________________________________<br>
                &gt;&gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt;&gt; that seams absolute logically to
                me.<br>
                &gt;&gt;&gt;&gt;&gt; But now I alter the Numbers in the
                Java-Part:<br>
                &gt;&gt;&gt;&gt;&gt; Number[] numbers = new Number[]
                {wrap(3), wrap(1), wrap(2)};<br>
                &gt;&gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt;&gt; and the output destroys everything
                I thought I understood:<br>
                &gt;&gt;&gt;&gt;&gt; Loading file: Example3.drl<br>
                &gt;&gt;&gt;&gt;&gt; Inserting fact: 3<br>
                &gt;&gt;&gt;&gt;&gt; Inserting fact: 1<br>
                &gt;&gt;&gt;&gt;&gt; Inserting fact: 2<br>
                &gt;&gt;&gt;&gt;&gt; Number found with value: 1<br>
                &gt;&gt;&gt;&gt;&gt; Number found with value: 3<br>
                &gt;&gt;&gt;&gt;&gt; Number found with value: 2<br>
                &gt;&gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt;&gt; Can someone &nbsp;reproduce this
                behavior?? It seams absolutely strange to<br>
                &gt;&gt;&gt; me.<br>
                &gt;&gt;&gt;&gt;&gt; I would have expected the order
                1,2,3. Any explanations?<br>
                &gt;&gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt;&gt; Thanks in advance for helping me!<br>
                &gt;&gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;
                _______________________________________________<br>
                &gt;&gt;&gt; rules-users mailing list<br>
                &gt;&gt;&gt; <a moz-do-not-send="true"
                  href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
                &gt;&gt;&gt; <a moz-do-not-send="true"
                  href="https://lists.jboss.org/mailman/listinfo/rules-users"
                  target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
                &gt;&gt;&gt;<br>
                &gt;&gt;<br>
                &gt; _______________________________________________<br>
                &gt; rules-users mailing list<br>
                &gt; <a moz-do-not-send="true"
                  href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
                &gt; <a moz-do-not-send="true"
                  href="https://lists.jboss.org/mailman/listinfo/rules-users"
                  target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
                <br>
                <br>
                _______________________________________________<br>
                rules-users mailing list<br>
                <a moz-do-not-send="true"
                  href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
                <a moz-do-not-send="true"
                  href="https://lists.jboss.org/mailman/listinfo/rules-users"
                  target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a></pre>
    </blockquote>
    <br>
  </body>
</html>