use of org.talend.designer.business.model.business.BusinessProcess in project tdi-studio-se by Talend.
the class SaveAsBusinessModelWizard method performFinish.
public boolean performFinish() {
boolean ok = false;
try {
IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
DiagramResourceManager diagramResourceManager = new DiagramResourceManager(page, new NullProgressMonitor());
file = diagramResourceManager.createDiagramFile();
isUpdate = isUpdate();
if (isUpdate) {
update();
} else {
property.setId(repositoryFactory.getNextId());
diagramResourceManager.updateFromResource(businessProcessItem, file);
BusinessProcess businessProcess = BusinessFactory.eINSTANCE.createBusinessProcess();
businessProcessItem.setSemantic(businessProcess);
// don't set these values directly
// businessProcessItem.setSemantic(oldItem.getSemantic());
// businessProcessItem.setNotation(oldItem.getNotation());
// businessProcessItem.setNotationHolder(oldItem.getNotationHolder());
repositoryFactory.create(businessProcessItem, mainPage.getDestinationPath());
}
ok = true;
} catch (Exception e) {
MessageDialog.openError(getShell(), "Error", "Business model could not be saved" + " : " + e.getMessage());
ExceptionHandler.process(e);
}
return ok;
}
Aggregations