use of com.centurylink.mdw.model.value.process.ProcessList in project mdw-designer by CenturyLinkCloud.
the class RuntimeDataAccessRest method hasProcessInstances.
public boolean hasProcessInstances(Long processId) throws DataAccessException {
try {
String pathWithArgs = "Processes?processId=" + processId + "&pageSize=1";
if (!getServer().isSchemaVersion61())
pathWithArgs = "ProcessInstances?format=json&pageSize=1&processId=" + processId;
String response = invokeResourceService(pathWithArgs);
return new ProcessList(ProcessList.PROCESS_INSTANCES, response).getCount() > 0;
} catch (IOException ex) {
throw new DataAccessOfflineException(ex.getMessage(), ex);
} catch (Exception ex) {
throw new DataAccessException(ex.getMessage(), ex);
}
}
Aggregations