final IJavaProject javaProject = JavaCore.create(file.getProject());
if (javaProject == null || !javaProject.exists()) {
return;
}
InputStreamReader isr = new InputStreamReader(((File) file).getContents());
KnowledgeBuilderConfigurationImpl configuration = new KnowledgeBuilderConfigurationImpl();
SemanticModules modules = configuration.getSemanticModules();
modules.addSemanticModule(new BPMNSemanticModule());
modules.addSemanticModule(new BPMNDISemanticModule());
modules.addSemanticModule(new BPMNExtensionsSemanticModule());
XmlProcessReader xmlReader = new XmlProcessReader( modules, Thread.currentThread().getContextClassLoader() );
String xml = RuleFlowMigrator.convertReaderToString(isr);