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">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.<br>
<br clear="all"><br>-- <br>cheers<br>Sumatheja Dasararaju<br><br><br>