[rules-users] Existing StateFulKnowledgeSession not taking the changes in the Guvnor
sumatheja
sumatheja at gmail.com
Tue May 1 15:27:02 EDT 2012
HI figured out the mistake.. I was not starting the following serives
ResourceFactory.getResourceChangeNotifierService().start();
ResourceFactory.getResourceChangeScannerService().start();
Everything works fine now. Thanks
On Tue, May 1, 2012 at 6:35 PM, sumatheja <sumatheja at gmail.com> wrote:
> Hi All,
> 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
>
>
> StatefulKnowledgeSession ksession = null;
> KnowledgeAgentConfiguration kconf =
> KnowledgeAgentFactory.newKnowledgeAgentConfiguration();
> KnowledgeBaseConfiguration config =
> KnowledgeBaseFactory.newKnowledgeBaseConfiguration();
> config.setOption( EventProcessingOption.STREAM );
> KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(
> config );
> kconf.setProperty("drools.agent.newInstance" , "false");
> KnowledgeAgent kagent =
> KnowledgeAgentFactory.newKnowledgeAgent("MyAgent1",kbase, kconf);
> kagent.applyChangeSet(ResourceFactory.newUrlResource("
> http://127.0.0.1:8380/drools-guvnor/LDIChangeSet.xml"));
>
> kbase = kagent.getKnowledgeBase();
> ksession = kbase.newStatefulKnowledgeSession();
>
>
> 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.
>
>
> --
> cheers
> Sumatheja Dasararaju
>
>
>
--
cheers
Sumatheja Dasararaju
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20120501/1a1f0e68/attachment.html
More information about the rules-users
mailing list