Hi Ric,<br><br>The method fireAllRules shouldn't block you ... I'm also using similar rules and similar fact inyection system and the fireAllRules never block me ... isnt it?<br><br><div class="gmail_quote">2009/11/13 richarda <span dir="ltr"><<a href="mailto:richard.ambridge@gmail.com">richard.ambridge@gmail.com</a>></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>
I may have solved this, but still not sure I am doing this 'correctly'<br>
<br>
I have changed this to use one call to fireUntilHalt()<br>
and then from the insert code it now inserts the fact and runs:<br>
ksession.startProcess("rulesflow");<br>
(and no fireAllRules)<br>
<br>
which seems to bring the engine to life again..<br>
<br>
Is this correct?<br>
<div><div></div><div class="h5"><br>
<br>
richarda wrote:<br>
><br>
> Hi all,<br>
><br>
> I am stuck trying to understand how to setup my drools system..<br>
><br>
> I am using Stream mode, with some negative rules, and a continuous stream<br>
> of facts.<br>
> Facts are evaluated and will in turn insert events into the memory if<br>
> required.<br>
><br>
> I thought it would be like this:<br>
> First, setup,<br>
><br>
> KnowledgeBaseConfiguration conf =<br>
> KnowledgeBaseFactory.newKnowledgeBaseConfiguration();<br>
> conf.setOption(EventProcessingOption.STREAM);<br>
> KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(conf);<br>
> kbase.addKnowledgePackages(builder.getKnowledgePackages());<br>
> ksession = kbase.newStatefulKnowledgeSession();<br>
><br>
> Then we have ksession...<br>
> The code that handles an incoming message will have a reference to<br>
> ksession..<br>
> and it will run:<br>
><br>
> WorkingMemoryEntryPoint eStream =<br>
> ksession.getWorkingMemoryEntryPoint("MessageStream");<br>
> eStream.insert(msg);<br>
> ksession.fireAllRules();<br>
><br>
> but here is my problem...<br>
> as some rules have things like not(Event(this after [0s,90m] $a))<br>
> then the fireAllRules can wait for the 90minutes to pass before<br>
> completing..<br>
><br>
> How do I do it so that there is one WorkingMemory,<br>
> and I can pump facts into that memory and the engine just keeps running<br>
> and my 'inputter' doesn't hang..?<br>
><br>
> Thanks<br>
> Ric<br>
><br>
><br>
<br>
--<br>
</div></div>View this message in context: <a href="http://old.nabble.com/Help-with-StatefulSession-and-Stream-Mode-tp26335206p26335542.html" target="_blank">http://old.nabble.com/Help-with-StatefulSession-and-Stream-Mode-tp26335206p26335542.html</a><br>
<div><div></div><div class="h5">Sent from the drools - user mailing list archive at Nabble.com.<br>
<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>
</div></div></blockquote></div><br>