To start up the notifier and scanner service I modified the Drools-Server ResourceChangeScannerBeanFactory as documented in this post:
I’m just wondering whether this is the right approach or if I should consider a Servlet as you have suggested. Did you have a particular reason for this approach?
BTW another caveat is that Declared Facts will not rebuild correctly, they just seem to get lost although other rules not dependent on any declared facts will fire normally. Using POJO’s is fine. Using new-instance =true will throw an error when a merge of the rules is attempted. I think this is a know issue with the rule agent.
You can configure a Knowledge Agent in Drools-Server using spring. You have to declare it in knowledge-services.xml config file. You need to do something like:
<drools:kagent id="kagent1" kbase="kbase1" new-instance="false">
<drools:resource type="DRL" source="file:/some/path/to/apache-tomcat-7.0.6/webapps/drools-server/WEB-INF/classes/test.drl"/>
<drools:resource type="PKG" source="http://somehost:8080/droolg-guvnor/.../LATEST"/>
For configure the scan interval, you can use:
<drools:resource-change-scanner id="s1" interval="5" />
There are, though, some caveats:
2011/4/15 Manuel Ortiz <email@example.com>
I am taking a look at Drools Integration documentation to understand how Drools server works and how can be used, and have a doubt concerning, let's say... 'KnowledgeAgent capabilities'. Does Drools server support on the fly rule updating as when using KnowledgeAgent to create KnowledgeBase objects? If it does, where can be configured 'KnowledgeAgent related' properties such as newInstance or resource scanner interval?
Thank you in advance for your time.
rules-users mailing list