<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=""> 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 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? </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"><<a
moz-do-not-send="true" href="mailto:mproctor@codehaus.org"
target="_blank">mproctor@codehaus.org</a>></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
<<a moz-do-not-send="true"
href="mailto:wolfgang.laun@gmail.com">wolfgang.laun@gmail.com</a>>
wrote:<br>
<br>
> Ah, my memory :-)<br>
><br>
> <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>
><br>
> Mark has promised a fix for 3 months ago, but of
course 5.5.0 remains broken.<br>
><br>
> -W<br>
><br>
> On 18/04/2013, Stefan Schuster <<a
moz-do-not-send="true"
href="mailto:stefan.m.schuster@gmail.com">stefan.m.schuster@gmail.com</a>>
wrote:<br>
>> Hi, thank you for your response.<br>
>> I'm using the latest stable release of Drools
5.5.0 final.<br>
>> Eclipse is Juno Service Release 2.<br>
>><br>
>> Can you confirm, that the order 1,2,3 is the
expected result?<br>
>><br>
>> If this is a known bug, is there some kind of
jira or bugzilla numer<br>
>> assigned to it?<br>
>><br>
>><br>
>><br>
>> 2013/4/18 Wolfgang Laun <<a
moz-do-not-send="true"
href="mailto:wolfgang.laun@gmail.com">wolfgang.laun@gmail.com</a>><br>
>><br>
>>> IIRC, this was a bug one or two minor
versions ago. What version are you<br>
>>> using?<br>
>>> -W<br>
>>><br>
>>> On 18/04/2013, Stefan Schuster <<a
moz-do-not-send="true"
href="mailto:stefan.m.schuster@gmail.com">stefan.m.schuster@gmail.com</a>>
wrote:<br>
>>>> For the sake of completeness, here is
also the RuleRunner class used<br>
>>>> in<br>
>>>> this example:<br>
>>>><br>
>>>> package org.drools.tutorials.banking;<br>
>>>><br>
>>>> import java.util.Collection;<br>
>>>><br>
>>>> import org.drools.KnowledgeBase;<br>
>>>> import org.drools.KnowledgeBaseFactory;<br>
>>>> import
org.drools.builder.KnowledgeBuilder;<br>
>>>> import
org.drools.builder.KnowledgeBuilderFactory;<br>
>>>> import org.drools.builder.ResourceType;<br>
>>>> import
org.drools.definition.KnowledgePackage;<br>
>>>> import org.drools.io.ResourceFactory;<br>
>>>> import
org.drools.runtime.StatefulKnowledgeSession;<br>
>>>><br>
>>>> public class RuleRunner {<br>
>>>><br>
>>>> public RuleRunner() {<br>
>>>> }<br>
>>>><br>
>>>> public void runRules(String[] rules,<br>
>>>> Object[] facts)
{<br>
>>>><br>
>>>> KnowledgeBase kbase =
KnowledgeBaseFactory.newKnowledgeBase();<br>
>>>> KnowledgeBuilder kbuilder =<br>
>>>>
KnowledgeBuilderFactory.newKnowledgeBuilder();<br>
>>>><br>
>>>> for ( int i = 0; i <
rules.length; i++ ) {<br>
>>>> String ruleFile = rules[i];<br>
>>>> System.out.println( "Loading
file: " + ruleFile );<br>
>>>> kbuilder.add(
ResourceFactory.newClassPathResource(<br>
>>>> ruleFile,<br>
>>>><br>
>>>> RuleRunner.class ),<br>
>>>>
ResourceType.DRL );<br>
>>>> }<br>
>>>><br>
>>>>
Collection<KnowledgePackage> pkgs =<br>
>>>> kbuilder.getKnowledgePackages();<br>
>>>> kbase.addKnowledgePackages( pkgs
);<br>
>>>> StatefulKnowledgeSession
ksession =<br>
>>>> kbase.newStatefulKnowledgeSession();<br>
>>>><br>
>>>> for ( int i = 0; i <
facts.length; i++ ) {<br>
>>>> Object fact = facts[i];<br>
>>>> System.out.println(
"Inserting fact: " + fact );<br>
>>>> ksession.insert( fact );<br>
>>>> }<br>
>>>><br>
>>>> ksession.fireAllRules();<br>
>>>> }<br>
>>>> }<br>
>>>><br>
>>>><br>
>>>> 2013/4/18 Stefan Schuster <<a
moz-do-not-send="true"
href="mailto:stefan.m.schuster@gmail.com">stefan.m.schuster@gmail.com</a>><br>
>>>><br>
>>>>> Hello,<br>
>>>>><br>
>>>>> I have a problem with the banking
tutorial number 3, which is part of<br>
>>> the<br>
>>>>> examples of drools expert.<br>
>>>>> It simply adds some Numbers as
facts, and retracts them in an<br>
>>>>> increasing<br>
>>>>> order.<br>
>>>>><br>
>>>>> It is very short, therefore I post
the whole Code:<br>
>>>>><br>
>>>>><br>
>>>>> BankingExample3.java<br>
>>>>>
_________________________________________________<br>
>>>>> package
org.drools.tutorials.banking;<br>
>>>>><br>
>>>>> public class BankingExample3 {<br>
>>>>> public static void main(String[]
args) {<br>
>>>>> Number[] numbers = new
Number[] {wrap(3), wrap(1), wrap(4),<br>
>>>>> wrap(1), wrap(5)};<br>
>>>>> new RuleRunner().runRules(
new String[] { "Example3.drl" },<br>
>>>>>
numbers );<br>
>>>>> }<br>
>>>>><br>
>>>>> private static Integer wrap(int
i) {<br>
>>>>> return new Integer(i);<br>
>>>>> }<br>
>>>>> }<br>
>>>>>
_________________________________________________<br>
>>>>><br>
>>>>><br>
>>>>><br>
>>>>> Example3.drl:<br>
>>>>>
_________________________________________________<br>
>>>>> package
org.drools.tutorials.banking<br>
>>>>><br>
>>>>> rule "Rule 01"<br>
>>>>> when<br>
>>>>> $number : Number()<br>
>>>>> not Number( intValue <
$number.intValue )<br>
>>>>> then<br>
>>>>> System.out.println("Number
found with value: " +<br>
>>>>> $number.intValue() );<br>
>>>>> retract( $number );<br>
>>>>> end<br>
>>>>>
_________________________________________________<br>
>>>>><br>
>>>>><br>
>>>>> Output:<br>
>>>>>
_________________________________________________<br>
>>>>> Loading file: Example3.drl<br>
>>>>> Inserting fact: 3<br>
>>>>> Inserting fact: 1<br>
>>>>> Inserting fact: 4<br>
>>>>> Inserting fact: 1<br>
>>>>> Inserting fact: 5<br>
>>>>> Number found with value: 1<br>
>>>>> Number found with value: 1<br>
>>>>> Number found with value: 3<br>
>>>>> Number found with value: 4<br>
>>>>> Number found with value: 5<br>
>>>>>
_________________________________________________<br>
>>>>><br>
>>>>><br>
>>>>> that seams absolute logically to
me.<br>
>>>>> But now I alter the Numbers in the
Java-Part:<br>
>>>>> Number[] numbers = new Number[]
{wrap(3), wrap(1), wrap(2)};<br>
>>>>><br>
>>>>> and the output destroys everything
I thought I understood:<br>
>>>>> Loading file: Example3.drl<br>
>>>>> Inserting fact: 3<br>
>>>>> Inserting fact: 1<br>
>>>>> Inserting fact: 2<br>
>>>>> Number found with value: 1<br>
>>>>> Number found with value: 3<br>
>>>>> Number found with value: 2<br>
>>>>><br>
>>>>><br>
>>>>> Can someone reproduce this
behavior?? It seams absolutely strange to<br>
>>> me.<br>
>>>>> I would have expected the order
1,2,3. Any explanations?<br>
>>>>><br>
>>>>> Thanks in advance for helping me!<br>
>>>>><br>
>>>>><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>
>>><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>
<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>