Search in sources :

Example 31 with ProcessVO

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;
}
Also used : ArrayList(java.util.ArrayList) ProcessVO(com.centurylink.mdw.model.value.process.ProcessVO)

Example 32 with ProcessVO

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;
}
Also used : ArrayList(java.util.ArrayList) ProcessVO(com.centurylink.mdw.model.value.process.ProcessVO)

Example 33 with ProcessVO

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());
    }
}
Also used : ProcessVO(com.centurylink.mdw.model.value.process.ProcessVO) IWorkbenchPage(org.eclipse.ui.IWorkbenchPage) PartInitException(org.eclipse.ui.PartInitException) WorkflowProcess(com.centurylink.mdw.plugin.designer.model.WorkflowProcess)

Example 34 with ProcessVO

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);
}
Also used : ProcessVO(com.centurylink.mdw.model.value.process.ProcessVO)

Example 35 with ProcessVO

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;
    }
}
Also used : ProcessVO(com.centurylink.mdw.model.value.process.ProcessVO) WorkflowProcess(com.centurylink.mdw.plugin.designer.model.WorkflowProcess)

Aggregations

ProcessVO (com.centurylink.mdw.model.value.process.ProcessVO)92 ArrayList (java.util.ArrayList)29 WorkflowProcess (com.centurylink.mdw.plugin.designer.model.WorkflowProcess)28 DataAccessException (com.centurylink.mdw.common.exception.DataAccessException)25 ValidationException (com.centurylink.mdw.designer.utils.ValidationException)17 IOException (java.io.IOException)17 HashMap (java.util.HashMap)15 RemoteException (java.rmi.RemoteException)14 ProcessWorker (com.centurylink.mdw.designer.utils.ProcessWorker)12 ActivityVO (com.centurylink.mdw.model.value.activity.ActivityVO)11 PackageVO (com.centurylink.mdw.model.value.process.PackageVO)11 JSONException (org.json.JSONException)11 RuleSetVO (com.centurylink.mdw.model.value.attribute.RuleSetVO)10 XmlException (org.apache.xmlbeans.XmlException)10 ActivityImplementorVO (com.centurylink.mdw.model.value.activity.ActivityImplementorVO)9 ProcessInstanceVO (com.centurylink.mdw.model.value.process.ProcessInstanceVO)9 DataAccessOfflineException (com.centurylink.mdw.dataaccess.DataAccessOfflineException)8 ExternalEventVO (com.centurylink.mdw.model.value.event.ExternalEventVO)8 VariableVO (com.centurylink.mdw.model.value.variable.VariableVO)7 AuthenticationException (com.centurylink.mdw.auth.AuthenticationException)5