private KnowledgeBase createKnowledgeBase(String process) throws Exception {
KnowledgeBaseFactory.setKnowledgeBaseServiceFactory(new ProcessBaseFactoryService());
KnowledgeBuilderConfiguration conf = KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration();
((PackageBuilderConfiguration) conf).initSemanticModules();
((PackageBuilderConfiguration) conf).addSemanticModule(new BPMNSemanticModule());
((PackageBuilderConfiguration) conf).addSemanticModule(new BPMNDISemanticModule());
// ProcessDialectRegistry.setDialect("XPath", new XPathDialect());
XmlProcessReader processReader = new XmlProcessReader(
((PackageBuilderConfiguration) conf).getSemanticModules(), getClass().getClassLoader());
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(conf);
List<Process> processes = processReader.read(SimpleBPMNProcessTest.class.getResourceAsStream("/" + process));