Hi,
I'm trying to use a change set to monitor a folder for drl files but I
can't get it to work right. If I list all the files in the folder all the
rules load correctly and everything thing is happy. If I just specify a
folder the mapping resource are associating rules from the test-two.drl file
with the test.drl file. Also the 'KnowledgeAgent adding' adds two test.two
(which is the package for the test-two.drl file) instead of a test and a
test.two. Which is what happens when I list the files in the change-set.
From the documentation it seems like this should work. Has anyone run
into
this before? What am I doing wrong? I'm using 5.2.0.M1.
Wendy
<?xml version="1.0" encoding="UTF-8"?>
<change-set
xmlns='http://drools.org/drools-5.0/change-set'
xmlns:xs='http://www.w3.org/2001/XMLSchema-instance'
xs:schemaLocation='http://drools.org/drools-5.0/change-set.xsd
drools-change-set-5.0.xsd'>
<add>
<resource source='file:Rules/DailyRules/' type='DRL'/>
</add>
</change-set>
[2011:09:257 20:09:317:info] ResourceChangeScanner reconfigured with
interval=60
[2011:09:257 20:09:317:info] ResourceChangeScanner created with default
interval=60
[2011:09:257 20:09:327:info] ResourceChangeScanner reconfigured with
interval=60
[2011:09:257 20:09:327:info] ResourceChangeScanner reconfigured with
interval=60
[2011:09:257 20:09:327:info] ResourceChangeNotification scanner has started
[2011:09:257 20:09:327:debug] ResourceChangeScanner attempt to scan 0
resources
[2011:09:257 20:09:347:debug] ResourceChangeScanner thread is waiting for 60
seconds.
[2011:09:257 20:09:377:info] ResourceChangeNotification created
[2011:09:257 20:09:417:info] ResourceChangeNotification has started
listening for ChangeSet publications
[2011:09:257 20:09:417:debug] ResourceChangeNotification thread is waiting
for queue update
[2011:09:257 20:09:667:debug] ResourceChangeNotification monitor added
monitor=org.drools.io.impl.ResourceChangeScannerImpl@1f4cf6f
[2011:09:257 20:09:677:debug] KnowledgeAgent building resource map
[2011:09:257 20:09:677:info] KnowledgeAgent has started listening for
ChangeSet notifications
[2011:09:257 20:09:677:info] KnowledgeAgent created, with configuration:
monitorChangeSetEvents=true scanResources=true scanDirectories=true
newInstance=true
(null: 4, 103): cvc-elt.1: Cannot find the declaration of element
'change-set'.
[2011:09:257 20:09:797:info] KnowledgeAgent applying ChangeSet
[2011:09:257 20:09:797:debug] KnowledgeAgent subscribing to
directory=[UrlResource path='file:Rules/DailyRules/']
[2011:09:257 20:09:797:debug] ResourceChangeNotification subscribing
listener=org.drools.agent.impl.KnowledgeAgentImpl@aee320 to
resource=[UrlResource path='file:Rules/DailyRules/']
[2011:09:257 20:09:797:debug] ResourceChangeScanner subcribing
notifier=org.drools.io.impl.ResourceChangeNotifierImpl@1c160cb to
resource=[UrlResource path='file:Rules/DailyRules/']
[2011:09:257 20:09:817:debug] KnowledgeAgent mapping resource=[FileResource
file='Rules\DailyRules\test-two.drl'] to KnowledgeDefinition=null
[2011:09:257 20:09:817:debug] KnowledgeAgent notifier subscribing to
resource=[FileResource file='Rules\DailyRules\test-two.drl']
[2011:09:257 20:09:817:debug] ResourceChangeNotification subscribing
listener=org.drools.agent.impl.KnowledgeAgentImpl@aee320 to
resource=[FileResource file='Rules\DailyRules\test-two.drl']
[2011:09:257 20:09:817:debug] ResourceChangeScanner subcribing
notifier=org.drools.io.impl.ResourceChangeNotifierImpl@1c160cb to
resource=[FileResource file='Rules\DailyRules\test-two.drl']
[2011:09:257 20:09:817:debug] KnowledgeAgent mapping resource=[FileResource
file='Rules\DailyRules\test.drl'] to KnowledgeDefinition=null
[2011:09:257 20:09:817:debug] KnowledgeAgent notifier subscribing to
resource=[FileResource file='Rules\DailyRules\test.drl']
[2011:09:257 20:09:817:debug] ResourceChangeNotification subscribing
listener=org.drools.agent.impl.KnowledgeAgentImpl@aee320 to
resource=[FileResource file='Rules\DailyRules\test.drl']
[2011:09:257 20:09:817:debug] ResourceChangeScanner subcribing
notifier=org.drools.io.impl.ResourceChangeNotifierImpl@1c160cb to
resource=[FileResource file='Rules\DailyRules\test.drl']
[2011:09:257 20:09:878:debug] KnowledgeAgent rebuilding KnowledgeBase using
ChangeSet
[2011:09:257 20:09:936:debug] KnowledgeAgent obtaining pkg
resource=[FileResource file='Rules\DailyRules\test-two.drl']
[2011:09:257 20:09:936:debug] KnowledgeAgent mapping resource=[FileResource
file='Rules\DailyRules\test-two.drl'] to KnowledgeDefinition=[Rule
name=hello one test two, agendaGroup=MAIN, salience=0, no-loop=false]
[2011:09:257 20:09:936:debug] KnowledgeAgent notifier subscribing to
resource=[FileResource file='Rules\DailyRules\test-two.drl']
[2011:09:257 20:09:936:debug] ResourceChangeNotification subscribing
listener=org.drools.agent.impl.KnowledgeAgentImpl@aee320 to
resource=[FileResource file='Rules\DailyRules\test-two.drl']
[2011:09:257 20:09:936:debug] KnowledgeAgent mapping resource=[FileResource
file='Rules\DailyRules\test-two.drl'] to KnowledgeDefinition=[Rule
name=hello two test two, agendaGroup=MAIN, salience=0, no-loop=false]
[2011:09:257 20:09:936:debug] KnowledgeAgent notifier subscribing to
resource=[FileResource file='Rules\DailyRules\test-two.drl']
[2011:09:257 20:09:936:debug] ResourceChangeNotification subscribing
listener=org.drools.agent.impl.KnowledgeAgentImpl@aee320 to
resource=[FileResource file='Rules\DailyRules\test-two.drl']
[2011:09:257 20:09:936:debug] KnowledgeAgent obtaining pkg
resource=[FileResource file='Rules\DailyRules\test.drl']
[2011:09:257 20:09:936:debug] KnowledgeAgent mapping resource=[FileResource
file='Rules\DailyRules\test.drl'] to KnowledgeDefinition=[Rule name=hello
one test two, agendaGroup=MAIN, salience=0, no-loop=false]
[2011:09:257 20:09:936:debug] KnowledgeAgent notifier subscribing to
resource=[FileResource file='Rules\DailyRules\test.drl']
[2011:09:257 20:09:936:debug] ResourceChangeNotification subscribing
listener=org.drools.agent.impl.KnowledgeAgentImpl@aee320 to
resource=[FileResource file='Rules\DailyRules\test.drl']
[2011:09:257 20:09:936:debug] KnowledgeAgent mapping resource=[FileResource
file='Rules\DailyRules\test.drl'] to KnowledgeDefinition=[Rule name=hello
two test two, agendaGroup=MAIN, salience=0, no-loop=false]
[2011:09:257 20:09:936:debug] KnowledgeAgent notifier subscribing to
resource=[FileResource file='Rules\DailyRules\test.drl']
[2011:09:257 20:09:936:debug] ResourceChangeNotification subscribing
listener=org.drools.agent.impl.KnowledgeAgentImpl@aee320 to
resource=[FileResource file='Rules\DailyRules\test.drl']
[2011:09:257 20:09:936:debug] KnowledgeAgent adding
KnowledgeDefinitionsPackage test.two
[2011:09:257 20:09:56:debug] KnowledgeAgent adding
KnowledgeDefinitionsPackage test.two
--
View this message in context:
http://drools.46999.n3.nabble.com/Changeset-does-not-monitor-folder-corre...
Sent from the Drools: User forum mailing list archive at
Nabble.com.