public void testAdHocSubProcess() throws Exception {
KnowledgeBuilderConfiguration conf = KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration();
((PackageBuilderConfiguration) conf).initSemanticModules();
((PackageBuilderConfiguration) conf).addSemanticModule(new BPMNSemanticModule());
((PackageBuilderConfiguration) conf).addSemanticModule(new BPMNDISemanticModule());
((PackageBuilderConfiguration) conf).addDialect("XPath", new XPathDialectConfiguration());
XmlProcessReader processReader = new XmlProcessReader(
((PackageBuilderConfiguration) conf).getSemanticModules());
RuleFlowProcess p = (RuleFlowProcess)
processReader.read(SimpleBPMNProcessTest.class.getResourceAsStream("/BPMN2-AdHocSubProcess.xml"));
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(conf);