private KnowledgeBase createKnowledgeBase(String process) throws Exception {
KnowledgeBaseFactory.setKnowledgeBaseServiceFactory(new KnowledgeBaseFactoryServiceImpl());
KnowledgeBuilderConfiguration conf = KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration();
((PackageBuilderConfiguration) conf).initSemanticModules();
((PackageBuilderConfiguration) conf).addSemanticModule(new BPMNSemanticModule());
((PackageBuilderConfiguration) conf).addSemanticModule(new BPMNDISemanticModule());
((PackageBuilderConfiguration) conf).addSemanticModule(new BPMNExtensionsSemanticModule());
// ProcessDialectRegistry.setDialect("XPath", new XPathDialect());
XmlProcessReader processReader = new XmlProcessReader(
((PackageBuilderConfiguration) conf).getSemanticModules(), getClass().getClassLoader());