<div dir="ltr">Confirmed, the problem not happen with 5.6.0-SNAPSHOT(see <a href="https://github.com/yuchangyuan/drools-test1s/tree/drools-5.6.0-SNAPSHOT">https://github.com/yuchangyuan/drools-test1s/tree/drools-5.6.0-SNAPSHOT</a>).<br>
<br>So, the bug is fixed and I am a little curious which commit fix the problem.<br><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Oct 4, 2013 at 9:19 PM, Yu Changyuan <span dir="ltr"><<a href="mailto:reivzy@gmail.com" target="_blank">reivzy@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thank you for your response.<br><br>I write my code in scala(that's why I don't include code in first post), and use sbt as build tool. I upload the code to github, at<br>
<a href="https://github.com/yuchangyuan/drools-test1s" target="_blank">https://github.com/yuchangyuan/drools-test1s</a> , so just clone the repo to get the code.<br>
<br>sbt 0.13 should be installed(see <a href="http://www.scala-sbt.org/" target="_blank">http://www.scala-sbt.org/</a> for howto install) before the code can be built and run,<br>after install sbt, just type 'sbt run' in project root directory(the directory contain 'build.sbt' file) to compile and run the code.<br>
<br>For drools 5.6.0-SNAPSHOT, I will try later.<br><br><br></div><div class="gmail_extra"><div><div class="h5"><br><br><div class="gmail_quote">On Fri, Oct 4, 2013 at 6:56 PM, Davide Sottara <span dir="ltr"><<a href="mailto:dsotty@gmail.com" target="_blank">dsotty@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>No, this is not normal. <br>
I could not reproduce it in 5.6.0-SNAPSHOT, however, could you try
that version too, and/or post a full<br>
reproducer - i.e. the exact code you are running?<br>
Hopefully it is already fixed<br>
Thanks<div><div><br>
<br>
<br>
On 10/03/2013 11:11 PM, Yu Changyuan wrote:<br>
</div></div></div>
<blockquote type="cite"><div><div>
<div dir="ltr">Hi, everyone,<br>
<br>
I just find that, insert an event into a entry point or insert
it directly into session will cause different behaviour, is this
expected?<br>
<br>
Here is the details:<br>
<br>
1. drools run in stream mode and use pseudo clock<br>
2. insert a MyEvent into entry-point "stream" and a MyEvent into
session directly every 1 seconds, start at 500ms.<br>
3. call fireAllRules every 1seconds, at second 1, second 2, etc<br>
4. drools version 5.5.0.Final<br>
<br>
Below is the rule:<br>
<br>
package me.ycy.drools.test1.data<br>
<br>
import java.util.List<br>
<br>
declare MyEvent<br>
@role(event)<br>
@timestamp(timestamp)<br>
end<br>
<br>
rule "over 0.3s"<br>
when<br>
$list: List() from collect(MyEvent() over
window:time(300ms))<br>
then<br>
System.out.println("Rule: with in 0.3s --> " +
$list);<br>
end<br>
<br>
rule "over 1s"<br>
when<br>
$list: List() from collect(MyEvent() over
window:time(1s))<br>
then<br>
System.out.println("Rule: with in 1s --> " + $list);<br>
end<br>
<br>
rule "over 3s"<br>
when<br>
$list: List() from collect(MyEvent() over
window:time(3s))<br>
then<br>
System.out.println("Rule: with in 3s --> " + $list);<br>
end<br>
<br>
rule "over 0.3s ep"<br>
when<br>
$list: List() from collect(MyEvent() over
window:time(300ms) from entry-point "stream")<br>
then<br>
System.out.println("Rule: with in 0.3s use ep --> " +
$list);<br>
end<br>
<br>
rule "over 1s ep"<br>
when<br>
$list: List() from collect(MyEvent() over
window:time(1s) from entry-point "stream")<br>
then<br>
System.out.println("Rule: with in 1s use ep --> " +
$list);<br>
end<br>
<br>
rule "over 3s ep"<br>
when<br>
$list: List() from collect(MyEvent() over
window:time(3s) from entry-point "stream")<br>
then<br>
System.out.println("Rule: with in 3s use ep --> " +
$list);<br>
end<br>
<br>
// ------- end of rule <br>
<br>
Finally, the output(just run 5 seconds)<br>
<br>
-------------- fire at 1000 ---------------<br>
Rule: with in 3s use ep --> [MyEvent(event 0,500)]<br>
Rule: with in 1s use ep --> [MyEvent(event 0,500)]<br>
Rule: with in 0.3s use ep --> [MyEvent(event 0,500)]<br>
Rule: with in 3s --> [MyEvent(event 0,500)]<br>
Rule: with in 1s --> [MyEvent(event 0,500)]<br>
Rule: with in 0.3s --> []<br>
-------------- fire at 2000 ---------------<br>
Rule: with in 3s use ep --> [MyEvent(event 0,500),
MyEvent(event 1,1500)]<br>
Rule: with in 1s use ep --> [MyEvent(event 0,500),
MyEvent(event 1,1500)]<br>
Rule: with in 0.3s use ep --> [MyEvent(event 0,500),
MyEvent(event 1,1500)]<br>
Rule: with in 3s --> [MyEvent(event 0,500), MyEvent(event
1,1500)]<br>
Rule: with in 1s --> [MyEvent(event 1,1500)]<br>
Rule: with in 0.3s --> []<br>
-------------- fire at 3000 ---------------<br>
Rule: with in 3s use ep --> [MyEvent(event 0,500),
MyEvent(event 1,1500), MyEvent(event 2,2500)]<br>
Rule: with in 1s use ep --> [MyEvent(event 0,500),
MyEvent(event 1,1500), MyEvent(event 2,2500)]<br>
Rule: with in 0.3s use ep --> [MyEvent(event 0,500),
MyEvent(event 1,1500), MyEvent(event 2,2500)]<br>
Rule: with in 3s --> [MyEvent(event 0,500), MyEvent(event
1,1500), MyEvent(event 2,2500)]<br>
Rule: with in 1s --> [MyEvent(event 2,2500)]<br>
Rule: with in 0.3s --> []<br>
-------------- fire at 4000 ---------------<br>
Rule: with in 3s use ep --> [MyEvent(event 1,1500),
MyEvent(event 2,2500), MyEvent(event 3,3500)]<br>
Rule: with in 1s use ep --> [MyEvent(event 1,1500),
MyEvent(event 2,2500), MyEvent(event 3,3500)]<br>
Rule: with in 0.3s use ep --> [MyEvent(event 1,1500),
MyEvent(event 2,2500), MyEvent(event 3,3500)]<br>
Rule: with in 3s --> [MyEvent(event 1,1500), MyEvent(event
2,2500), MyEvent(event 3,3500)]<br>
Rule: with in 1s --> [MyEvent(event 3,3500)]<br>
Rule: with in 0.3s --> []<br>
-------------- fire at 5000 ---------------<br>
Rule: with in 3s use ep --> [MyEvent(event 2,2500),
MyEvent(event 3,3500), MyEvent(event 4,4500)]<br>
Rule: with in 1s use ep --> [MyEvent(event 2,2500),
MyEvent(event 3,3500), MyEvent(event 4,4500)]<br>
Rule: with in 0.3s use ep --> [MyEvent(event 2,2500),
MyEvent(event 3,3500), MyEvent(event 4,4500)]<br>
Rule: with in 3s --> [MyEvent(event 2,2500), MyEvent(event
3,3500), MyEvent(event 4,4500)]<br>
Rule: with in 1s --> [MyEvent(event 4,4500)]<br>
Rule: with in 0.3s --> []<br>
<br>
<br>
<br>
-- <br>
Best regards,<br>
Changyuan
</div>
<br>
<fieldset></fieldset>
<br>
</div></div><pre>_______________________________________________
rules-users mailing list
<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a></pre>
</blockquote>
<br>
</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><br clear="all"><br></div></div><span class="HOEnZb"><font color="#888888">-- <br>
Best regards,<br>Changyuan
</font></span></div>
</blockquote></div><br><br clear="all"><br>-- <br>Best regards,<br>Changyuan
</div>