I have changed the methodo performFinish in class NewProcessDefinitionWizard like this:
public boolean performFinish() { try { IFolder folder = page.getProcessFolder(); folder.create(true, true, null); IFile processDefinitionFile = folder.getFile("processdefinition.xml"); processDefinitionFile.create(createInitialProcessDefinition(), true, null); IFile gpdFile = folder.getFile("gpd.xml"); gpdFile.create(createInitialGpdInfo(), true, null); IFile abpmFile = folder.getFile("abpm.xml"); abpmFile.create(createInitialABPMInfo(), true, null); IDE.openEditor(getActivePage(), gpdFile); openPropertiesView(); BasicNewResourceWizard.selectAndReveal(gpdFile, getActiveWorkbenchWindow()); return true; } catch (CoreException e) { e.printStackTrace(); return false; } }
private ByteArrayInputStream createInitialABPMInfo() { String parName = page.getProcessFolder().getName(); String processName = parName; StringBuffer buffer = new StringBuffer(); buffer.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"); buffer.append("\n"); buffer.append("\n"); buffer.append("<process-definition\n" + " name=\"" + processName + "\">\n" + "</process-definition>"); return new ByteArrayInputStream(buffer.toString().getBytes()); }