psentosa wrote:
Hi all,
Can anyone give some explanation / examples on this? The docu is still using
ruleagent.
I found some piece of codes within the KnowledgeAgentFactory, but I saw that
it uses the configuration object.
The javadocs:
https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/t...
https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/t...
There are a number of unit tests you can follow:
http://anonsvn.labs.jboss.com/labs/jbossrules/trunk/drools-compiler/src/t...
http://anonsvn.labs.jboss.com/labs/jbossrules/trunk/drools-compiler/src/t...
http://anonsvn.labs.jboss.com/labs/jbossrules/trunk/drools-decisiontables...
http://anonsvn.labs.jboss.com/labs/jbossrules/trunk/drools-decisiontables...
I personally prefer the old style by using
a property file in which the configuration is defined.
The properties file does not offer enough flexibilility to support all
resource types - the xml really is quite simple - how do you specify the
worksheet name for a decision tree? In some ways it's actually simpler
and more powerful, as there is no separate line for directories, it's
just another resource and it detects that it's a directory. ChangeSets
will eventually support remove and modify, for incremental knowledgebase
changes, so the properties file just doesn't cut it.
<change-set>
<add>
<resource
source='http://www.domain.com/test.drl' type='DRL'
/>
<resource source='file://data/somedir' type='DRL' />
<resource
source='http://www.domain.com/test.xls' type='DTABLE'
>
<decisiontable-conf worksheet-name='sheet10' input-type='XLS'
/>
</resource>
</add>
</change-set>
Mark
Thanks in advance for any help
Regards
Paul