HI figured out the mistake.. I was not starting the following serives<br><br> ResourceFactory.getResourceChangeNotifierService().start();<br> ResourceFactory.getResourceChangeScannerService().start();<br>
<br>Everything works fine now. Thanks<br><br><div class="gmail_quote">On Tue, May 1, 2012 at 6:35 PM, sumatheja <span dir="ltr"><<a href="mailto:sumatheja@gmail.com" target="_blank">sumatheja@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi All,<br> I have a problem refreshing the sateful knowledge session whenever there is a change in the rules assets int he guvnor. Below is my code used for configuration<br>
<br><br> StatefulKnowledgeSession ksession = null;<br>
KnowledgeAgentConfiguration kconf = KnowledgeAgentFactory.newKnowledgeAgentConfiguration(); <br> KnowledgeBaseConfiguration config = KnowledgeBaseFactory.newKnowledgeBaseConfiguration();<br> config.setOption( EventProcessingOption.STREAM );<br>
KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase( config );<br> kconf.setProperty("drools.agent.newInstance" , "false");<br> KnowledgeAgent kagent = KnowledgeAgentFactory.newKnowledgeAgent("MyAgent1",kbase, kconf);<br>
kagent.applyChangeSet(ResourceFactory.newUrlResource("<a href="http://127.0.0.1:8380/drools-guvnor/LDIChangeSet.xml" target="_blank">http://127.0.0.1:8380/drools-guvnor/LDIChangeSet.xml</a>"));<br><br>
kbase = kagent.getKnowledgeBase();<br>
ksession = kbase.newStatefulKnowledgeSession();<br><br> <br>I've a session where I've inserted thousands of facts. Whenever there is change in the rule base Do I need to reinsert all the facts using the new knowledgeBase? Any help would be appreciated. Thanks in advance.<span class="HOEnZb"><font color="#888888"><br>
<br clear="all"><br>-- <br>cheers<br>Sumatheja Dasararaju<br><br><br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br>cheers<br>Sumatheja Dasararaju<br><br><br>