BPELFactory bpelFactory = new DefaultBPELFactory(modelFactories);
modelFactories.addFactory(bpelFactory);
}
public void testLoadBPELProcessDefinition() throws Exception {
BPELDocumentProcessor bpelDocumentProcessor = new BPELDocumentProcessor(modelFactories);
URI processURI = getClass().getClassLoader().getResource(BPEL_PROCESS_FILE).toURI();
URL processLocation = getClass().getClassLoader().getResource(BPEL_PROCESS_FILE);
BPELProcessDefinition bpelProcessDefinition = bpelDocumentProcessor.read(null, processURI, processLocation);
assertNotNull(bpelProcessDefinition);
assertEquals(new QName("http://tuscany.apache.org/implementation/bpel/example/helloworld", "HelloWorld"), bpelProcessDefinition.getName());
assertEquals(processLocation, bpelProcessDefinition.getLocation());
}