Could you append the log output of the Knowledge Agent?<div><br></div><div>Best Regards,<br clear="all"><br>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<br><br>Esteban Aliverti<br>- Developer @ <a href="http://www.plugtree.com" target="_blank">http://www.plugtree.com </a><br>

- Blog @ <a href="http://ilesteban.wordpress.com" target="_blank">http://ilesteban.wordpress.com</a><br>
<br><br><div class="gmail_quote">On Wed, Apr 4, 2012 at 4:12 PM, albertorugnone <span dir="ltr">&lt;<a href="mailto:arugnonechemical@gmail.com">arugnonechemical@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Thank you every body for your answer, unfortunately I was&#39;t able to reply to<br>
you until now because other stuff overwhelmed me literally at work.<br>
Anyway I was going ahead using KnowledgeAgent, following your comments and<br>
other suggestion. Now I am able to load rules applying change set with<br>
KnowledgeAgent (thank you!!!), but honestly this is a poor success because,<br>
even if when I change the rule KnowledgeAgent says &quot;incremental build of<br>
KnowledgeBase finished and in use&quot; nothing changes.<br>
It seems that changes at rules have no effect and it is pretty weird. I made<br>
a maven project with eclipse to explain you better my problem. Is a simple<br>
main. I am working for a better junit test. Anyway if you change the rule in<br>
the folder knowledge you can test the problem by yourself.<br>
Briefly I will explain the project:<br>
<br>
Here the code:<br>
<br>
                _l.warn(&quot;START&quot;);<br>
<div class="im">                String xml = &quot;&quot;;<br>
                xml += &quot;&lt;change-set xmlns=&#39;<a href="http://drools.org/drools-5.0/change-set&#39;&amp;quot" target="_blank">http://drools.org/drools-5.0/change-set&#39;&amp;quot</a>;;<br>
                xml += &amp;quot;<br>
xmlns:xs=&#39;<a href="http://www.w3.org/2001/XMLSchema-instance&#39;&amp;quot" target="_blank">http://www.w3.org/2001/XMLSchema-instance&#39;&amp;quot</a>;;<br>
                xml += &amp;quot;<br>
xs:schemaLocation=&#39;<a href="http://drools.org/drools-5.0/change-set" target="_blank">http://drools.org/drools-5.0/change-set</a><br>
drools-change-set-5.0.xsd&#39; &gt;&quot;;<br>
                xml += &quot;    &lt;add&gt; &quot;;<br>
</div>                xml += &quot;        &lt;resource source=&#39;Z:/EXP/drools-test/knowledge/test.drl&#39;<br>
<div class="im">type=&#39;DRL&#39; /&gt;&quot;;<br>
                xml += &quot;    &lt;/add&gt; &quot;;<br>
                xml += &quot;&lt;/change-set&gt;&quot;;<br>
                FileManager fileManager = new FileManager();<br>
                File fxml = fileManager.newFile(&quot;changeset.xml&quot;);<br>
</div><div class="im">                Writer output = new BufferedWriter(new FileWriter(fxml));<br>
                output.write(xml);<br>
                output.close();<br>
</div>                // build a KnowledgeAgent<br>
<div class="im">                ResourceFactory.getResourceChangeNotifierService()<br>
                                                .start();<br>
                ResourceFactory.getResourceChangeScannerService()<br>
                                                .start();<br>
<br>
                final ResourceChangeScannerConfiguration sconf =<br>
ResourceFactory.getResourceChangeScannerService()<br>
                                                                                                                                                .newResourceChangeScannerConfiguration();<br>
                sconf.setProperty(&quot;drools.resource.scanner.interval&quot;, &quot;2&quot;);<br>
                ResourceFactory.getResourceChangeScannerService()<br>
                                                .configure(sconf);<br>
<br>
                final KnowledgeAgentConfiguration aconf =<br>
KnowledgeAgentFactory.newKnowledgeAgentConfiguration();<br>
                aconf.setProperty(&quot;drools.agent.scanDirectories&quot;, &quot;true&quot;);<br>
                aconf.setProperty(&quot;drools.agent.scanResources&quot;, &quot;true&quot;);<br>
</div>                /*<br>
                 * important newInstance has to be false in order to update the<br>
                 * knowledge base and not rebuild a new one<br>
                 */<br>
                aconf.setProperty(&quot;drools.agent.newInstance&quot;, &quot;false&quot;);<br>
                final KnowledgeAgent agent =<br>
KnowledgeAgentFactory.newKnowledgeAgent(&quot;pch.sel.knowledge.agent&quot;, aconf);<br>
<div class="im">                // if (_l.isDebugEnabled()) {<br>
                /* we need some log every time */<br>
                agent.setSystemEventListener(new PrintStreamSystemEventListener());<br>
<br>
</div>agent.applyChangeSet(ResourceFactory.newClassPathResource(&quot;pch.sel.kwset.xml&quot;));<br>
                // fire rules<br>
                StatefulKnowledgeSession session =<br>
agent.getKnowledgeBase().newStatefulKnowledgeSession();<br>
                session.fireAllRules();<br>
                _l.warn(&quot;END&quot;);<br>
<br>
<br>
and here the rule<br>
<br>
<br>
package it.ipiu.drools.KnowledgeAgent.test<br>
<br>
rule &quot;test rule&quot; timer(int: 0s 2s)<br>
    when<br>
        eval(true);<br>
    then<br>
            System.out.println(&quot;ciao&quot;);<br>
end<br>
<br>
<br>
<br>
If I try to change timer from 2s to 2m nothing changes even if<br>
KnowledgeAgent seems to reload all.<br>
<br>
*Please help!!! I googled the problem everywhere without solution!!!*<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/KnowledgeAgent-Changeset-problems-tp3787165p3884201.html" target="_blank">http://drools.46999.n3.nabble.com/KnowledgeAgent-Changeset-problems-tp3787165p3884201.html</a><br>


<div class="HOEnZb"><div class="h5">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>
</div></div></blockquote></div><br></div>