Ok so I've added the listeners and I have run 2 scenarios: 1. I do not recreate the KA before I re-run a session, and all the info that I get even after having deleted a rule from the package is :
// at the beginning [2013-05-02 23:23:32,031:info] ResourceChangeNotification scanner has started [2013-05-02 23:23:32,032:debug] ResourceChangeScanner attempt to scan 2 resources [2013-05-02 23:23:32,033:debug] ResourceChangeScanner thread is waiting for 60 seconds. [2013-05-02 23:23:32,034:info] ResourceChangeNotification has started listening for ChangeSet publications [2013-05-02 23:23:32,034:debug] ResourceChangeNotification thread is waiting for queue update [2013-05-02 23:23:32,232:info] ResourceChangeScanner reconfigured with interval=20 [2013-05-02 23:23:32,232:info] ResourceChangeScanner reconfigured with interval=20 [2013-05-02 23:23:32,232:info] ResourceChangeNotification scanner has stopped [2013-05-02 23:23:32,233:info] ResourceChangeNotification scanner has started // after starting the services [2013-05-02 23:23:32,233:debug] ResourceChangeScanner attempt to scan 2 resources [2013-05-02 23:23:32,234:debug] ResourceChangeScanner thread is waiting for 20 seconds. 2. I re-create the KA before I run a session, and dispose of the previous KA, and this is what I get without even making any changes to the rules (the same messages stating that the services have started are present but not included): // after disposing of agent [2013-05-02 23:23:50,466:debug] KnowledgeAgent unsubscribing from resource=[ReaderResource resource=null encoding='null'] [2013-05-02 23:23:50,466:debug] ResourceChangeNotification unsubscribing listener=org.drools.agent.impl.KnowledgeAgentImpl@9a8636 to resource=[ReaderResource resource=null encoding='null'] [2013-05-02 23:23:50,467:debug] ResourceChangeScanner unsubcribing notifier=org.drools.io.impl.ResourceChangeNotifierImpl@e171b2 to resource=[ReaderResource resource=null encoding='null'] [2013-05-02 23:23:50,467:debug] ResourceChangeScanner resource=[ReaderResource resource=null encoding='null'] now has no subscribers [2013-05-02 23:23:50,467:debug] KnowledgeAgent unsubscribing from resource=[ClassPathResource path='ruleFiles/BasicWithFacts.drl'] [2013-05-02 23:23:50,467:debug] ResourceChangeNotification unsubscribing listener=org.drools.agent.impl.KnowledgeAgentImpl@9a8636 to resource=[ClassPathResource path='ruleFiles/BasicWithFacts.drl'] [2013-05-02 23:23:50,467:debug] ResourceChangeScanner unsubcribing notifier=org.drools.io.impl.ResourceChangeNotifierImpl@e171b2 to resource=[ClassPathResource path='ruleFiles/BasicWithFacts.drl'] [2013-05-02 23:23:50,467:debug] ResourceChangeScanner resource=[ClassPathResource path='ruleFiles/BasicWithFacts.drl'] now has no subscribers // after re creating the agent [2013-05-02 23:23:50,698:debug] KnowledgeAgent building resource map [2013-05-02 23:23:50,699:debug] KnowledgeAgent no resource mapped for type=TypeDeclaration{typeName='StateEvent', role=FACT, format=POJO, kind=CLASS, nature=DECLARATION} [2013-05-02 23:23:50,699:debug] KnowledgeAgent mapping resource=[ClassPathResource path='ruleFiles/BasicWithFacts.drl'] to KnowledgeDefinition=TypeDeclaration{typeName='StateEvent', role=FACT, format=POJO, kind=CLASS, nature=DECLARATION} [2013-05-02 23:23:50,699:debug] KnowledgeAgent notifier subscribing to resource=[ClassPathResource path='ruleFiles/BasicWithFacts.drl'] [2013-05-02 23:23:50,699:debug] ResourceChangeNotification subscribing listener=org.drools.agent.impl.KnowledgeAgentImpl@1eaa99b to resource=[ClassPathResource path='ruleFiles/BasicWithFacts.drl'] [2013-05-02 23:23:50,698:info] KnowledgeAgent has started listening for ChangeSet notifications [2013-05-02 23:23:50,699:debug] ResourceChangeScanner subcribing notifier=org.drools.io.impl.ResourceChangeNotifierImpl@e171b2 to resource=[ClassPathResource path='ruleFiles/BasicWithFacts.drl'] [2013-05-02 23:23:50,699:debug] KnowledgeAgent mapping resource=[ClassPathResource path='ruleFiles/BasicWithFacts.drl'] to KnowledgeDefinition=[Rule name=sensor has reading value, agendaGroup=MAIN, salience=12, no-loop=true] [2013-05-02 23:23:50,699:warning] KnowledgeAgent: impossible to add a map for a null resource! skiping. [2013-05-02 23:23:50,699:debug] KnowledgeAgent mapping resource=[ReaderResource resource=null encoding='null'] to KnowledgeDefinition=[Rule name=bla, agendaGroup=MAIN, salience=12, no-loop=true] [2013-05-02 23:23:50,699:debug] KnowledgeAgent notifier subscribing to resource=[ReaderResource resource=null encoding='null'] [2013-05-02 23:23:50,699:debug] ResourceChangeNotification subscribing listener=org.drools.agent.impl.KnowledgeAgentImpl@1eaa99b to resource=[ReaderResource resource=null encoding='null'] [2013-05-02 23:23:50,699:debug] ResourceChangeScanner subcribing notifier=org.drools.io.impl.ResourceChangeNotifierImpl@e171b2 to resource=[ReaderResource resource=null encoding='null'] [2013-05-02 23:23:50,699:warning] KnowledgeAgent: impossible to add a map for a null resource! skiping. [2013-05-02 23:23:50,699:debug] KnowledgeAgent no resource mapped for type=TypeDeclaration{typeName='StateEvent', role=FACT, format=POJO, kind=CLASS, nature=DECLARATION} [2013-05-02 23:23:50,699:warning] KnowledgeAgent: impossible to add a map for a null resource! skiping. [2013-05-02 23:23:50,699:info] KnowledgeAgent created, with configuration: monitorChangeSetEvents=true scanResources=true scanDirectories=true newInstance=false [2013-05-02 23:23:50,700:info] ResourceChangeNotification scanner has started [2013-05-02 23:23:50,700:debug] ResourceChangeScanner attempt to scan 2 resources [2013-05-02 23:23:50,700:debug] ResourceChangeScanner thread is waiting for 20 seconds. >From what I'm reading it seems that the Guvnor resource package is null and so there is nothing to subscribe to. I do not understand what I might be doing wrong in this case or how to fix this since the rules are actually included in the knowledge base. Thank you very much for any help! -- View this message in context: http://drools.46999.n3.nabble.com/Re-rules-users-KnowledgeAgent-to-update-knowledge-base-built-with-Guvnor-pkg-tp4023608p4023649.html Sent from the Drools: User forum mailing list archive at Nabble.com. _______________________________________________ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users