<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Nestor Tarin Burriel wrote:
<blockquote
 cite="mid:c4174f470904020806t53a5867ds118993e33f4324e5@mail.gmail.com"
 type="cite">Sorry Edson ... I can't declare the fact type with the
parameter @role( event ) in guvnor throw creating a declarative model
:( could you explain it better?<br>
</blockquote>
I don't believe the tooling in Guvnor supports that yet, you'll have to
use the DRL directly.<br>
<br>
Mark<br>
<blockquote
 cite="mid:c4174f470904020806t53a5867ds118993e33f4324e5@mail.gmail.com"
 type="cite"><br>
  <div class="gmail_quote">2009/4/2 Edson Tirelli <span dir="ltr">&lt;<a
 moz-do-not-send="true" href="mailto:tirelli@post.com">tirelli@post.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;"><br>
&nbsp;&nbsp; Declare your fact type with @role( event ).<br>
    <br>
    <div class="gmail_quote">2009/4/2 Nestor Tarin Burriel <span
 dir="ltr">&lt;<a moz-do-not-send="true"
 href="mailto:nestabur@gmail.com" target="_blank">nestabur@gmail.com</a>&gt;</span>
    <div>
    <div class="h5"><br>
    <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">And
how can I create events from guvnor?<br>
      <br>
      <div class="gmail_quote">2009/4/2 Edson Tirelli <span dir="ltr">&lt;<a
 moz-do-not-send="true" href="mailto:tirelli@post.com" target="_blank">tirelli@post.com</a>&gt;</span>
      <div>
      <div><br>
      <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
&nbsp;&nbsp; Need to fix the error message, but it seems you are trying to use
the sliding window on regular facts... sliding window only makes sense
for events...<br>
        <br>
&nbsp;&nbsp; Also, the property you are using to set the event processing mode
seems wrong. Check here:
        <div><br>
        <br>
        <a moz-do-not-send="true"
 href="https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/docs/drools-fusion/html/ch02.html#d0e1067"
 target="_blank">https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/docs/drools-fusion/html/ch02.html#d0e1067</a><br>
        <br>
        </div>
&nbsp;&nbsp;&nbsp; []s<br>
&nbsp;&nbsp;&nbsp; Edson<br>
        <br>
        <div class="gmail_quote">2009/4/2 nestabur <span dir="ltr">&lt;<a
 moz-do-not-send="true" href="mailto:nestabur@gmail.com" target="_blank">nestabur@gmail.com</a>&gt;</span>
        <div>
        <div><br>
        <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
          <br>
          <br>
Hi All,<br>
          <br>
I'm trying to use sliding windows with guvnor, I deploy the package in
my<br>
rule engine as:<br>
          <br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Properties props = new Properties();<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;props.put("url", rulePackagePath);<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;props.put("eventProcessingMode", "stream");<br>
          <br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;agent = RuleAgent.newRuleAgent(props);<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;session = agent.getRuleBase().newStatefulSession();<br>
          <br>
When I insert a fact into the working memory as:<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;session.insert(fact);<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;session.fireAllRules();<br>
          <br>
I get the following error:<br>
          <br>
Exception while processing message: java.lang.ClassCastException:<br>
org.drools.common.DefaultFactHandle cannot be cast to<br>
org.drools.common.EventFactHandle<br>
java.lang.ClassCastException: org.drools.common.DefaultFactHandle
cannot be<br>
cast to org.drools.common.EventFactHandle<br>
&nbsp; &nbsp; &nbsp; &nbsp;at<br>
org.drools.rule.SlidingTimeWindow.updateNextExpiration(SlidingTimeWindow.java:192)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at<br>
org.drools.rule.SlidingTimeWindow.assertRightTuple(SlidingTimeWindow.java:119)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at<br>
org.drools.rule.BehaviorManager.assertRightTuple(BehaviorManager.java:87)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at org.drools.reteoo.ExistsNode.assertObject(ExistsNode.java:172)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at<br>
org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:366)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at<br>
org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:349)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:147)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at<br>
org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:42)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:184)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at
org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:146)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at<br>
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:1066)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at<br>
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:1022)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at<br>
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:810)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at<br>
com.s2grupo.triton.service.impl.CorrelatorServiceImpl.insertFact(CorrelatorServiceImpl.java:64)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at<br>
com.s2grupo.triton.jms.impl.JmsMessageListenerImpl.onMessage(JmsMessageListenerImpl.java:67)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at<br>
org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:1021)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at<br>
org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor.java:122)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at<br>
org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:192)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at<br>
org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:122)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at<br>
org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:43)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at<br>
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at<br>
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)<br>
&nbsp; &nbsp; &nbsp; &nbsp;at java.lang.Thread.run(Thread.java:619)<br>
          <br>
What I'm missing? Is it a bug? I'm using the 5.0.0.SNAPSHOT version of<br>
drools.<br>
          <br>
Thanks,<br>
          <br>
NEStor<br>
          <div>
          <div><br>
          <br>
ober0n wrote:<br>
&gt;<br>
&gt; Hi Ed, thanks for the quick reply, I will try the temporal
constraints as<br>
&gt; well.<br>
&gt;<br>
&gt; I haven't completed my testing yet but the sliding windows seems
to be<br>
&gt; working. Thanks!<br>
&gt;<br>
&gt; I am getting a strange problem of my program hanging. It gets all
the way<br>
&gt; past my "dispose()" of the StatefulKnowledgeSession and closing the<br>
&gt; session logger and to the end of my main(). Then it just sits
there. I'm<br>
&gt; thinking it's a bug in my rules but wanted to make sure this
wasn't a<br>
&gt; feature of Streams (maybe some thread kicked off to accept facts or<br>
&gt; something).<br>
&gt;<br>
&gt; If you could just confirm nothing in Drools fusion is supposed to
continue<br>
&gt; running, that would be great.<br>
&gt;<br>
&gt; Here are the significant snippets of my code:<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ...<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WorkingMemoryEntryPoint eventStream =<br>
&gt; ksession.getWorkingMemoryEntryPoint( "EventStream" );<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ...<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; eventStream.insert(goodbye_message);<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Thread.sleep(10000);<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; eventStream.insert(hello_message);<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ksession.fireAllRules();<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ksession.dispose();<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; logger.close();<br>
&gt; &nbsp; &nbsp; &nbsp; } catch (Throwable t) {<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; t.printStackTrace();<br>
&gt; &nbsp; &nbsp; &nbsp; }<br>
&gt; } // end main() &nbsp;&lt;-- tracing through the code, I get past the
end of<br>
&gt; main() then see a "Source not found." in the Eclipse debugger
which seems<br>
&gt; to be looking for "Thread.exit() line: 604"<br>
&gt;<br>
&gt;<br>
&gt; The updated rule:<br>
&gt;<br>
&gt; declare Message<br>
&gt; &nbsp; &nbsp; @role( event )<br>
&gt; end<br>
&gt;<br>
&gt; rule "Hello World"<br>
&gt; &nbsp; &nbsp; &nbsp; when<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Message( status == Message.HELLO ) from entry-point
"EventStream"<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; exists(Message( status == Message.GOODBYE ) over
window:time( 4s ) &nbsp;from<br>
&gt; entry-point "EventStream")<br>
&gt; &nbsp; &nbsp; &nbsp; then<br>
&gt;<br>
&gt;
System.out.println("**************************************************");<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.println( "There was a GOODBYE message
near the HELLO<br>
&gt; message." );<br>
&gt;<br>
&gt;
System.out.println("**************************************************");<br>
&gt; end<br>
&gt;<br>
&gt; Thanks.<br>
&gt;<br>
&gt;<br>
&gt; Edson Tirelli-3 wrote:<br>
&gt;&gt;<br>
&gt;&gt; &nbsp; &nbsp; Although your rule should work, the best way to write your
rule would<br>
&gt;&gt; be<br>
&gt;&gt; using temporal constraints instead of sliding windows:<br>
&gt;&gt;<br>
&gt;&gt; rule "Goodbye before Hello World"<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;when<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$m : Message( status == Message.HELLO )<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;exists( Message( status == Message.GOODBYE, this<br>
&gt;&gt; before[0s,3s] $m ) )<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;then<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;System.out.println( "There was a GOODBYE
message before<br>
&gt;&gt; the<br>
&gt;&gt; HELLO<br>
&gt;&gt; message." );<br>
&gt;&gt; end<br>
&gt;&gt;<br>
&gt;&gt; &nbsp; &nbsp; Using "before" operator is not only much cheaper (in terms
of used<br>
&gt;&gt; resources) than sliding windows, but it also allow the engine
to reason<br>
&gt;&gt; over<br>
&gt;&gt; the temporal constraints looking for special cases, like when
you use<br>
&gt;&gt; negative patterns.<br>
&gt;&gt;<br>
&gt;&gt; &nbsp; &nbsp; I will look further into your case to check if I missed
anything on<br>
&gt;&gt; the<br>
&gt;&gt; sliding windows support, but using STREAM mode should work.<br>
&gt;&gt;<br>
&gt;&gt; &nbsp; &nbsp; If you can open a JIRA for me to raise a compilation error
when<br>
&gt;&gt; compiling sliding windows using CLOUD mode, I appreciate. This
will allow<br>
&gt;&gt; you to follow up my progress.<br>
&gt;&gt;<br>
&gt;&gt; &nbsp; &nbsp; []s<br>
&gt;&gt; &nbsp; &nbsp; Edson<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; 2009/3/30 ober0n &lt;<a moz-do-not-send="true"
 href="mailto:lili339@hotmail.com" target="_blank">lili339@hotmail.com</a>&gt;<br>
&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Hi Ed, no need to apologize, you have been invaluable in
my first steps<br>
&gt;&gt;&gt; towards Drooling :-D so thanks for all your help, it is
GREATLY<br>
&gt;&gt;&gt; appreciated<br>
&gt;&gt;&gt; :clap:.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; We have a few scenarios in mind but aren't really
implementing them yet,<br>
&gt;&gt;&gt; just trying to see if sliding windows works the way we
think it does. In<br>
&gt;&gt;&gt; the<br>
&gt;&gt;&gt; simple rule I wrote above, I basically want to check if
two facts are<br>
&gt;&gt;&gt; temporally close.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Yes, you are correct. I didn't pay enough attention to the
manual and<br>
&gt;&gt;&gt; didn't<br>
&gt;&gt;&gt; use STREAM mode to enter in my facts. I will use the
manual insertion<br>
&gt;&gt;&gt; process found in "Example 2.10. Inserting facts into an
entry point" of<br>
&gt;&gt;&gt; section "2.3. Streams Support" to update my code. And, I
will update my<br>
&gt;&gt;&gt; rule<br>
&gt;&gt;&gt; to specify a "from entry-point &lt;Specific Stream&gt;".<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Also, could you comment on the simple rule I am using?
Does it look like<br>
&gt;&gt;&gt; it<br>
&gt;&gt;&gt; should work after I do the updates? Or is my logic
incorrect?<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Thanks again.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; &nbsp; Ober0n,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; &nbsp; Sorry for the delay on answering. I am on a trip with
limited internet<br>
&gt;&gt;&gt; connection.<br>
&gt;&gt;&gt; &nbsp; I am interested in your experience with the sliding
windows, since the<br>
&gt;&gt;&gt; tests are working. Maybe it is a scenario not covered by
the tests.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; &nbsp; In any case, what is probably happening is that you are
not<br>
&gt;&gt;&gt; configuring<br>
&gt;&gt;&gt; the engine to work in STREAM mode. The default mode is
CLOUD and it does<br>
&gt;&gt;&gt; not<br>
&gt;&gt;&gt; support sliding windows. It seems the engine is silently
failing in this<br>
&gt;&gt;&gt; case, when the compiler raise an error to warn the user.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; &nbsp; &nbsp;I just committed some docs on this subject:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; <a moz-do-not-send="true"
 href="https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/docs/drools-fusion/html/ch02.html#d0e1067"
 target="_blank">https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/docs/drools-fusion/html/ch02.html#d0e1067</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; &nbsp; &nbsp;(plz, wait for hudson to rebuild the docs or build docs
yourself).<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; &nbsp; &nbsp;Feedback welcome. I will complement the sliding window
docs.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; &nbsp; &nbsp;[]s<br>
&gt;&gt;&gt; &nbsp; &nbsp;Edson<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; 2009/3/29 ober0n &lt;<a moz-do-not-send="true"
 href="mailto:lili339@hotmail.com" target="_blank">lili339@hotmail.com</a>&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; Still trying to get sliding windows to work (basing
my code off of the<br>
&gt;&gt;&gt; &gt; Eclipse supplied "Hello World" example). I don't
think I fully<br>
&gt;&gt;&gt; understand<br>
&gt;&gt;&gt; &gt; how it works yet so I'm trying to simplify things
even further by<br>
&gt;&gt;&gt; writing<br>
&gt;&gt;&gt; &gt; a<br>
&gt;&gt;&gt; &gt; simple rule that is meant to say:<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; if (current_message = "Hello" AND exists(
goodbye_message within<br>
&gt;&gt;&gt; &gt; sliding_window(3 seconds) ))<br>
&gt;&gt;&gt; &gt; then print("There was a GOODBYE message before the
HELLO message." )<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; In other words: This rule should fire if the current
Hello World<br>
&gt;&gt;&gt; message<br>
&gt;&gt;&gt; &gt; was<br>
&gt;&gt;&gt; &gt; preceeded within 3 seconds by a goodbye message.<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt;
---------------------------------------------------------------------------------------------------<br>
&gt;&gt;&gt; &gt; I wrote a new rule for this:<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; declare Message<br>
&gt;&gt;&gt; &gt; &nbsp; &nbsp;@role( event )<br>
&gt;&gt;&gt; &gt; end<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; rule "Goodbye before Hello World"<br>
&gt;&gt;&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp;when<br>
&gt;&gt;&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Message( status == Message.HELLO )<br>
&gt;&gt;&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;exists( Message( status ==
Message.GOODBYE ) over<br>
&gt;&gt;&gt; &gt; window:time( 3s ) )<br>
&gt;&gt;&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp;then<br>
&gt;&gt;&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;System.out.println( "There was a
GOODBYE message before<br>
&gt;&gt;&gt; the<br>
&gt;&gt;&gt; &gt; HELLO<br>
&gt;&gt;&gt; &gt; message." );<br>
&gt;&gt;&gt; &gt; end<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt;
---------------------------------------------------------------------------------------------------<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; To send the messages: (ksession is a
StatefulKnowledgeSession)<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;...<br>
&gt;&gt;&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;ksession.insert(goodbye_message);<br>
&gt;&gt;&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ksession.fireAllRules();<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Thread.sleep(5000);<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ksession.insert(hello_message);<br>
&gt;&gt;&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ksession.fireAllRules();<br>
&gt;&gt;&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;...<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt;
---------------------------------------------------------------------------------------------------<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; I expect to get nothing back since I sent the Hello
message 5 seconds<br>
&gt;&gt;&gt; &gt; after<br>
&gt;&gt;&gt; &gt; the goodbye message (outside the sliding window of 3
seconds). But,<br>
&gt;&gt;&gt; for<br>
&gt;&gt;&gt; &gt; some<br>
&gt;&gt;&gt; &gt; reason the rule fires and I get one:<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; "There was a GOODBYE message before the HELLO
message."<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; Any help would be greatly appreciated.<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; Thanks!<br>
&gt;&gt;&gt; &gt; --<br>
&gt;&gt;&gt; &gt; View this message in context:<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; <a moz-do-not-send="true"
 href="http://www.nabble.com/Trying-to-get-Sliding-Windows-to-work-tp22735051p22770318.html"
 target="_blank">http://www.nabble.com/Trying-to-get-Sliding-Windows-to-work-tp22735051p22770318.html</a><br>
&gt;&gt;&gt; &gt; Sent from the drools - user mailing list archive at
Nabble.com.<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; _______________________________________________<br>
&gt;&gt;&gt; &gt; rules-users mailing list<br>
&gt;&gt;&gt; &gt; <a moz-do-not-send="true"
 href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br>
&gt;&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; &gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; --<br>
&gt;&gt;&gt; &nbsp;Edson Tirelli<br>
&gt;&gt;&gt; &nbsp;JBoss Drools Core Development<br>
&gt;&gt;&gt; &nbsp;JBoss, a division of Red Hat @ <a moz-do-not-send="true"
 href="http://www.jboss.com" target="_blank">www.jboss.com</a><br>
&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" target="_blank">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;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; --<br>
&gt;&gt;&gt; View this message in context:<br>
&gt;&gt;&gt; <a moz-do-not-send="true"
 href="http://www.nabble.com/Trying-to-get-Sliding-Windows-to-work-tp22735051p22785711.html"
 target="_blank">http://www.nabble.com/Trying-to-get-Sliding-Windows-to-work-tp22735051p22785711.html</a><br>
&gt;&gt;&gt; Sent from the drools - user mailing list archive at
Nabble.com.<br>
&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" target="_blank">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;&gt;<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; &nbsp;Edson Tirelli<br>
&gt;&gt; &nbsp;JBoss Drools Core Development<br>
&gt;&gt; &nbsp;JBoss, a division of Red Hat @ <a moz-do-not-send="true"
 href="http://www.jboss.com" target="_blank">www.jboss.com</a><br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; rules-users mailing list<br>
&gt;&gt; <a moz-do-not-send="true"
 href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br>
&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;<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
          <br>
--<br>
          </div>
          </div>
View this message in context: <a moz-do-not-send="true"
 href="http://www.nabble.com/Trying-to-get-Sliding-Windows-to-work-tp22735051p22844999.html"
 target="_blank">http://www.nabble.com/Trying-to-get-Sliding-Windows-to-work-tp22735051p22844999.html</a><br>
          <div>
          <div>Sent from the drools - user mailing list archive at
Nabble.com.<br>
          <br>
_______________________________________________<br>
rules-users mailing list<br>
          <a moz-do-not-send="true"
 href="mailto:rules-users@lists.jboss.org" target="_blank">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>
        </div>
        </div>
        <br>
        <br clear="all">
        <br>
-- <br>
        <div>
        <div> &nbsp;Edson Tirelli<br>
&nbsp;JBoss Drools Core Development<br>
&nbsp;JBoss, a division of Red Hat @ <a moz-do-not-send="true"
 href="http://www.jboss.com" target="_blank">www.jboss.com</a><br>
        </div>
        </div>
        <br>
_______________________________________________<br>
rules-users mailing list<br>
        <a moz-do-not-send="true"
 href="mailto:rules-users@lists.jboss.org" target="_blank">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>
      </blockquote>
      </div>
      </div>
      </div>
      <br>
      <br>
_______________________________________________<br>
rules-users mailing list<br>
      <a moz-do-not-send="true"
 href="mailto:rules-users@lists.jboss.org" target="_blank">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>
    </blockquote>
    </div>
    </div>
    </div>
    <div>
    <div class="h5"><br>
    <br clear="all">
    <br>
-- <br>
&nbsp;Edson Tirelli<br>
&nbsp;JBoss Drools Core Development<br>
&nbsp;JBoss, a division of Red Hat @ <a moz-do-not-send="true"
 href="http://www.jboss.com" target="_blank">www.jboss.com</a><br>
    </div>
    </div>
    <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>
  </blockquote>
  </div>
  <br>
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
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>