use of com.centurylink.mdw.dataaccess.ProcessLoader in project mdw-designer by CenturyLinkCloud.
the class DesignerDataAccess method getProcessDefinition.
public ProcessVO getProcessDefinition(String procname, int version) throws RemoteException, DataAccessException {
if (procname.indexOf(RemoteAccess.REMOTE_NAME_DELIMITER) > -1) {
int k = procname.indexOf(RemoteAccess.REMOTE_NAME_DELIMITER);
String properProcname = procname.substring(0, k);
String logicalServerName = procname.substring(k + 1);
RemoteAccess rao = remoteAccess.get(logicalServerName);
if (rao == null) {
rao = createRemoteAccess(logicalServerName);
remoteAccess.put(logicalServerName, rao);
}
ProcessLoader procLoader = rao.getLoader();
ProcessVO procdef = procLoader.getProcessBase(properProcname, version);
procdef.setRemoteServer(logicalServerName);
return procdef;
} else {
return loader.getProcessBase(procname, version);
}
}
use of com.centurylink.mdw.dataaccess.ProcessLoader in project mdw-designer by CenturyLinkCloud.
the class DesignerDataAccess method getProcess.
public ProcessVO getProcess(Long procId, ProcessVO procdef) throws DataAccessException {
if (procdef != null && procdef.isRemote()) {
ProcessLoader procLoader = remoteAccess.get(procdef.getRemoteServer()).getLoader();
return procLoader.loadProcess(procId, true);
} else {
ProcessVO process = loader.loadProcess(procId, true);
if (process == null && remoteAssetRetrieve)
process = remoteRetrieveProcess(procId);
if (process != null) {
if (isVcsPersist()) {
if (remoteAssetRetrieve) {
try {
Map<String, String> overrideAttrs = workflowAccessRest.getAttributes(OwnerType.PROCESS, procId);
process.applyOverrideAttributes(overrideAttrs);
} catch (IOException ex) {
System.err.println("Server not running: " + ex);
}
}
} else {
if (process.isInRuleSet())
process.applyOverrideAttributes(getAttributes(OwnerType.PROCESS, procId));
}
}
return process;
}
}
Aggregations