} catch (IOException exception) {
exception.printStackTrace();
}
}
final Diagram diagram
= Graphiti.getPeCreateService().createDiagram("BPMNdiagram", diagramName, true);
FileService.createEmfFileForDiagram(uri, diagram, diagramEditor, null, null);
final String providerId
= GraphitiUi.getExtensionManager().getDiagramTypeProviderId(diagram.getDiagramTypeId());
final ActivitiDiagramEditorInput result
= new ActivitiDiagramEditorInput(EcoreUtil.getURI(diagram), providerId);
result.setDataFile(finalDataFile);