[rules-users] Problem migrating from newClassPathResource to newUrlResource
abhinay_agarwal
abhinay_agarwal at infosys.com
Wed May 15 01:27:24 EDT 2013
Hey David,
I have already done that, look at the code that m using.
For your reference:
KnowledgeAgentConfiguration kaconf =
KnowledgeAgentFactory.newKnowledgeAgentConfiguration();
kaconf.setProperty( "drools.agent.scanDirectories",
"false" );
KnowledgeAgent kagent =
KnowledgeAgentFactory.newKnowledgeAgent( "test agent", kaconf );
UrlResource urlResource = (UrlResource)
ResourceFactory.newUrlResource("http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/Goal%20Creation%20Charges/LATEST/ChangeSet.xml");
urlResource.setResourceType(ResourceType.PKG); //
used ResourceType.CHANGE_SET after mark's reply
urlResource.setBasicAuthentication("enabled");
urlResource.setUsername("admin");
urlResource.setPassword("admin");
kagent.applyChangeSet(urlResource);
kbase=kagent.getKnowledgeBase();
--
View this message in context: http://drools.46999.n3.nabble.com/Problem-migrating-from-newClassPathResource-to-newUrlResource-tp4023490p4023821.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
More information about the rules-users
mailing list