Maciej Swiderski [
https://community.jboss.org/people/swiderski.maciej] created the
discussion
"Re: KnowledgeBase loading on demand"
To view the discussion, visit:
https://community.jboss.org/message/746336#746336
--------------------------------------------------------------
Then you could manually operate on the knowledge base, something like this:
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
// add you process definitions here...
kbuilder.add(ResourceFactory.newFileResource(subfile), ResourceType.BPMN2);
kbase.addKnowledgePackages(kbuilder.getKnowledgePackages());
// if you like to remove it you can remove the package
kbase.removeKnowledgePackage(packageName);
So you can load the process definitions from whatever source you want, if not already
supported by ResourceFactory you can implement your own...
Please nore that building knowledge base is considered a heavy operation and should be
rather reused instead of rebuilt frequently.
HTH
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/746336#746336]
Start a new discussion in jBPM at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]