Thank you for the idea. It looks good.
But I have some problems with it.
I load Guvnor's data using the following method:
private static KnowledgeBase readKnowledgeBase() {
ProcessBuilderFactory.setProcessBuilderFactoryService(new
ProcessBuilderFactoryServiceImpl());
ProcessMarshallerFactory.setProcessMarshallerFactoryService(new
ProcessMarshallerFactoryServiceImpl());
ProcessRuntimeFactory.setProcessRuntimeFactoryService(new
ProcessRuntimeFactoryServiceImpl());
BPMN2ProcessFactory.setBPMN2ProcessProvider(new
BPMN2ProcessProviderImpl());
KnowledgeAgentConfiguration config =
KnowledgeAgentFactory.newKnowledgeAgentConfiguration();
// setup authentication to guvnor rest interface.
Authenticator.setDefault(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(USER_NAME,
PASSWORD.toCharArray());
}
});
KnowledgeAgent knowledgeAgent =
KnowledgeAgentFactory.newKnowledgeAgent("MyKnowledgeAgent", config);
knowledgeAgent.applyChangeSet(ResourceFactory.newUrlResource("http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor"
+ "/package/defaultPackage/LATEST/ChangeSet.xml"));
return knowledgeAgent.getKnowledgeBase();
}
But before changes in the repository will be available I have to build
package in Guvnor (using button Build Package). It's acceptable solution
(however it will be good to fully automate this process).
And the problem is that version is changing right after saving, but not
after building a package. Is it possible to detect package build events
remotely?
Also when I'm listening the version feed (like in the link provided above) I
reload entire Knowledge Base. Is it possible to load only changed data?
Thank you for your attention.
--
View this message in context:
http://drools.46999.n3.nabble.com/Access-to-Guvnor-s-JackRabbit-remotely-...
Sent from the Drools: User forum mailing list archive at
Nabble.com.