I don&#39;t see how &lt;drools:batch&gt; in combination with a real time clock is going to provide you with a scenario where some B can be 10s or more after an A.<br><br>There is no particular knob to turn in order to use Fusion. Basically, it&#39;s Expert, with some features triggered by declaring fact types as events so that timestamps are applied upon fact insertion. <br>
<br>If your facts are inserted in real time into an ongoing stateful session, declare with @role(event) and a realtime clock in STREAM mode is adequate. Otherwise you may have to provide timestamps as bean properties, identify the field in the declare and then you can use CLOUD mode.<br>
<br>-W<br><br><br><br><div class="gmail_quote">On 26 August 2011 17:08, eskomk <span dir="ltr">&lt;<a href="mailto:esko.hujanen@ebsolut.fi">esko.hujanen@ebsolut.fi</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi all,<br>
<br>
I&#39;m new to Drools.<br>
We need to have Fusion features in our systems, especially temporal<br>
relations on events.<br>
The problem is we don&#39;t know how to take Fusion in use.<br>
<br>
Our rules do not fire, why ?<br>
What are the steps to get Fusion up and running ?<br>
<br>
We are using Drools as a web service, and it is fed with xml-formed facts<br>
through REST interface.<br>
Drools itself works ok.<br>
We use Guvnor as rule editor, and have its snapshot included as CHANGE_SET<br>
resource in knowledge-services.xml, so that&#39;s not a problem.<br>
<br>
The rules we are now interested in sits in separate .drl files which are<br>
read as DRL resources in knowledge-services.xml<br>
(file contents below, with BBBafterAAA.drl as a resource).<br>
<br>
As I have understood, we must change to stateful session from stateless, to<br>
use Fusion.<br>
This is so that we can define the event processing mode as STREAM in<br>
kbase-definition,<br>
and clock-type as REALTIME in session-definition.<br>
<br>
We are primarily using Drools version 5.1.1 on several physical and virtual<br>
servers<br>
(we are just learning Drools for now, primaliry gathering data to be used in<br>
Drools).<br>
Now I am testing Drools version 5.3.0-SNAPSHOT (drools-camel-server),<br>
where the config file snippet below are taken.<br>
<br>
&lt;path&gt; below replaces the actual package names.<br>
<br>
We have declared some incoming facts to be events (never mind the Bean<br>
ending):<br>
declares_drl.drl<br>
{file}<br>
package org.test;<br>
<br>
import &lt;path&gt;.AAABean;<br>
import &lt;path&gt;.BBBBean;<br>
<br>
<br>
declare AAABean<br>
    @role(event)<br>
end<br>
<br>
declare BBBBean<br>
    @role(event)<br>
end<br>
{/file}<br>
<br>
File BBBafterAAA.drl contents, withot THEN part:<br>
{file}<br>
package org.test;<br>
<br>
import &lt;path&gt;.AAABean;<br>
import &lt;path&gt;.BBBBean;<br>
<br>
/*<br>
declare AAABean<br>
    @role(event)<br>
end<br>
<br>
declare BBBBean<br>
    @role(event)<br>
end<br>
*/<br>
<br>
rule &quot;BBBAfterAAA&quot;<br>
dialect &quot;mvel&quot;<br>
no-loop true<br>
salience 100<br>
<br>
when<br>
    $Aaa : AAABean();<br>
    $Bbb : BBBBean(this after[10s, 10m] $Aaa);<br>
then<br>
// Consequences go here<br>
{/file}<br>
<br>
File knowledge-services.xml contents:<br>
{file}<br>
&lt;beans xmlns=&quot;<a href="http://www.springframework.org/schema/beans" target="_blank">http://www.springframework.org/schema/beans</a>&quot;<br>
       xmlns:xsi=&quot;<a href="http://www.w3.org/2001/XMLSchema-instance" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a>&quot;<br>
       xmlns:drools=&quot;<a href="http://drools.org/schema/drools-spring" target="_blank">http://drools.org/schema/drools-spring</a>&quot;<br>
       xsi:schemaLocation=&quot;<a href="http://www.springframework.org/schema/beans" target="_blank">http://www.springframework.org/schema/beans</a><br>
<a href="http://www.springframework.org/schema/beans/spring-beans-2.0.xsd" target="_blank">http://www.springframework.org/schema/beans/spring-beans-2.0.xsd</a><br>
                           <a href="http://drools.org/schema/drools-spring" target="_blank">http://drools.org/schema/drools-spring</a><br>
<a href="http://drools.org/schema/drools-spring-1.3.0.xsd" target="_blank">http://drools.org/schema/drools-spring-1.3.0.xsd</a>&quot;&gt;<br>
<br>
  &lt;drools:grid-node id=&quot;node1&quot;/&gt;<br>
<br>
  &lt;drools:resource-change-scanner id=&quot;scanner&quot; interval=&quot;2&quot; /&gt;<br>
<br>
  &amp;lt;bean name=&amp;quot;CCCInitBean&amp;quot; class=&amp;quot;&amp;lt;path&amp;gt;.InitBean&quot;&gt;<br>
        &lt;property name=&quot;initOk&quot; value=&quot;false&quot;/&gt;<br>
  &lt;/bean&gt;<br>
<br>
<br>
  &lt;drools:kbase id=&quot;kbase1&quot; node=&quot;node1&quot;&gt;<br>
    &lt;drools:resources&gt;<br>
            &lt;drools:resource  type=&quot;DRL&quot; source=&quot;classpath:test.drl&quot;/&gt;<br>
            &lt;drools:resource  type=&quot;DRL&quot;<br>
source=&quot;classpath:declares_drl.drl&quot;/&gt;<br>
            &lt;drools:resource  type=&quot;DRL&quot;<br>
source=&quot;classpath:BBBafterAAA.drl&quot;/&gt;<br>
            &lt;drools:resource  type=&quot;CHANGE_SET&quot;<br>
source=&quot;classpath:ChangeSet.xml&quot;/&gt;<br>
    &lt;/drools:resources&gt;<br>
<br>
    &lt;drools:configuration&gt;<br>
            &lt;drools:event-processing-mode mode=&quot;STREAM&quot;/&gt;<br>
    &lt;/drools:configuration&gt;<br>
  &lt;/drools:kbase&gt;<br>
<br>
<br>
  &lt;drools:kagent id=&quot;kagent1&quot; kbase=&quot;kbase1&quot; new-instance=&quot;false&quot;&gt;<br>
        &lt;drools:resources&gt;<br>
<br>
                &lt;drools:resource  type=&quot;CHANGE_SET&quot; source=&quot;classpath:ChangeSet.xml&quot;/&gt;<br>
<br>
        &lt;/drools:resources&gt;<br>
  &lt;/drools:kagent&gt;<br>
<br>
<br>
  &lt;drools:ksession id=&quot;ksession1&quot; type=&quot;stateful&quot; kbase=&quot;kbase1&quot;<br>
node=&quot;node1&quot;&gt;<br>
        &lt;drools:configuration&gt;<br>
            &lt;drools:clock-type type=&quot;REALTIME&quot;/&gt;<br>
        &lt;/drools:configuration&gt;<br>
                &lt;drools:batch&gt;<br>
                        &lt;drools:insert-object ref=&quot;mirellaInitBean&quot;/&gt;<br>
                        &lt;drools:fire-all-rules /&gt;<br>
                &lt;/drools:batch&gt;<br>
<br>
<br>
  &lt;/drools:ksession&gt;<br>
<br>
<br>
&lt;/beans&gt;<br>
{/file}<br>
<br>
<br>
Cheers,<br>
Esko<br>
<a href="http://www.ebsolut.fi" target="_blank">http://www.ebsolut.fi</a><br>
<font color="#888888"><br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/How-to-deploy-Fusion-tp3287119p3287119.html" target="_blank">http://drools.46999.n3.nabble.com/How-to-deploy-Fusion-tp3287119p3287119.html</a><br>
Sent from the Drools: User forum mailing list archive at Nabble.com.<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>
</font></blockquote></div><br>