[rules-users] Drools server and knowledge agent functionality
Esteban Aliverti
esteban.aliverti at gmail.com
Fri Apr 15 08:40:17 EDT 2011
Hi.
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:resources>
<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"/>
</drools:resources>
</drools:kagent>
For configure the scan interval, you can use:
<drools:resource-change-scanner id="s1" interval="5" />
There are, though, some caveats:
- If you are deploying drools-server in tomcat, then you can't use
classpath resources in the kagent. I have reported this problem today.
- drools-server doesn't start ResourceChangeNotifierService
nor ResourceChangeScannerService automatically. You need to hack some way to
invoke ResourceFactory.getResourceChangeNotifierService().start();
and ResourceFactory.getResourceChangeScannerService().start();. I was
thinking in a Servlet that calls these methods in its init() method.
Best Regards,
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Esteban Aliverti
- Developer @ http://www.plugtree.com
- Blog @ http://ilesteban.wordpress.com
2011/4/15 Manuel Ortiz <manuel.ortizramos at gmail.com>
> Hello everybody:
>
> 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.
>
> Kind regards,
>
> Manuel Ortiz.
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110415/7be3e981/attachment.html
More information about the rules-users
mailing list