use of com.centurylink.mdw.model.value.process.ProcessVO in project mdw-designer by CenturyLinkCloud.
the class PluginDataAccess method getAllProcesses.
public List<ProcessVO> getAllProcesses(boolean reload) {
List<ProcessVO> allProcesses = new ArrayList<>();
List<ProcessVO> latestProcesses = getProcesses(reload);
for (ProcessVO latestProcess : latestProcesses) {
allProcesses.add(latestProcess);
ProcessVO prevVersion = latestProcess;
while ((prevVersion = prevVersion.getPrevVersion()) != null) {
allProcesses.add(prevVersion);
}
}
return allProcesses;
}
use of com.centurylink.mdw.model.value.process.ProcessVO in project mdw-designer by CenturyLinkCloud.
the class PluginDataAccess method getProcessNames.
public List<String> getProcessNames(boolean reload) {
List<ProcessVO> processVOs = getProcesses(reload);
List<String> processNames = new ArrayList<>();
for (ProcessVO processVO : processVOs) {
processNames.add(processVO.getProcessName());
}
Collections.sort(processNames);
return processNames;
}
use of com.centurylink.mdw.model.value.process.ProcessVO in project mdw-designer by CenturyLinkCloud.
the class SubProcessInstancesSection method openSubProcessInstance.
private void openSubProcessInstance(ProcessInstanceVO processInstanceInfo) {
// create a new instance for a new editor
ProcessVO subprocess = new ProcessVO();
subprocess.setProcessId(processInstanceInfo.getProcessId());
subprocess.setProcessName(processInstanceInfo.getProcessName());
WorkflowProcess toOpen = new WorkflowProcess(element.getProject(), subprocess);
toOpen.setPackage(element.getProject().getProcessPackage(subprocess.getId()));
toOpen.setProcessInstance(processInstanceInfo);
IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
try {
page.openEditor(toOpen, "mdw.editors.process");
} catch (PartInitException ex) {
PluginMessages.uiError(getShell(), ex, "Open SubProcess Instances", element.getProject());
}
}
use of com.centurylink.mdw.model.value.process.ProcessVO in project mdw-designer by CenturyLinkCloud.
the class Exporter method exportProcess.
public String exportProcess(String name, String version, boolean oldNamespaces) throws DataAccessException, RemoteException, XmlException {
int dotIdx = version.indexOf('.');
int major = Integer.parseInt(version.substring(0, dotIdx));
int minor = Integer.parseInt(version.substring(dotIdx + 1));
// load the process for export
ProcessVO procVO = designerDataAccess.getProcessDefinition(name, major * 1000 + minor);
return designerDataAccess.exportProcess(procVO.getProcessId(), oldNamespaces);
}
use of com.centurylink.mdw.model.value.process.ProcessVO in project mdw-designer by CenturyLinkCloud.
the class ProcessInstanceListView method getProcessVersion.
private WorkflowProcess getProcessVersion(WorkflowProcess processVersion, String version) {
if (version.length() == 0) {
WorkflowProcess pv = new WorkflowProcess(workflowProject, new ProcessVO(processVersion.getProcessVO()));
// indicates exclude version
pv.getProcessVO().setProcessId(0L);
// from criteria
pv.setPackage(processVersion.getPackage());
return pv;
} else {
ProcessVO processVO = workflowProject.getDataAccess().getProcess(processVersion.getName(), version);
WorkflowProcess pv = new WorkflowProcess(workflowProject, processVO);
pv.setPackage(processVersion.getPackage());
return pv;
}
}
Aggregations