Am trying to fetch all process from drools repository by using the following code.
But size of "kbase.rulebase.process" is always "0".
Java Logic
| | | | KnowledgeAgent kagent = KnowledgeAgentFactory.newKnowledgeAgent( "MyAgent" ); |
| | | | kagent.applyChangeSet(ResourceFactory.newClassPathResource("ChangeSet.xml")); |
| | | | kbase = kagent.getKnowledgeBase(); |
ChangeSet.xml
<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 change-set-1.0.0.xsd">
<add>
<resource
source="http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/defaultPackage/LATEST"
type="PKG" basicAuthentication="enabled" username="admin" password="admin" />
</add>
</change-set>
what is the logic am missing here to load the processes into "kbase.rules.packages"
is this the correct way ?