Hi!
I did a lot of searching aroung the web, drools doc and this mailing
list but could not solve my problem.
I want to monitor a folder for BRL File so i used the Agent.
Java Code:
KnowledgeAgent kbAgent = KnowledgeAgentFactory.newKnowledgeAgent("kbAgent");
Resource resource = ResourceFactory.newUrlResource("ChangeSet.xml");
kbAgent.applyChangeSet(resource);
ResourceFactory.getResourceChangeNotifierService().start();
ResourceFactory.getResourceChangeScannerService().start();
ChangeSet.xml:
<change-set>
<add>
<resource
source='file:/Z:/rules'
type='BRL' />
</add>
</change-set>
Result:
When i execute the code, the agent starts up, finds the brl file in the
folder and parses them.
But:
* It tries to parse the drools.package file with the imports for the brl
files as BRL file as well
* So i tried to work around and tweaked the implementation of
KnowledgeAgentImpl, so it skips the drools.package file when scanning
the folder for brl files. But now i get:
"com.thoughtworks.xstream.io.StreamException: : Content is not allowed
in prolog." plus "[Fatal Error] :1:1: Content is not allowed in prolog."
in the console. As far as i could trace the error, the problem is that
the imports are not added to the internally generated drl (package).
So how do i use the agent properly to use brl files?
Any ideas on this?
Thank you for reading,
Dave
--
===========
This mail account will accept only Mails from jboss mailing lists. If you like to send me
an email, delete the .drools_user_list in the sender address.