use of com.centurylink.mdw.common.task.TaskList in project mdw-designer by CenturyLinkCloud.
the class RuntimeDataAccessRest method getTaskInstancesForProcessInstance.
public List<TaskInstanceVO> getTaskInstancesForProcessInstance(Long processInstanceId) throws DataAccessException {
try {
if (getServer().getSchemaVersion() >= 6000) {
String path = "Tasks?processInstanceId=" + processInstanceId;
String response = invokeResourceService(path);
return new TaskList(TaskList.TASKS, response).getItems();
} else {
String path = "ProcessTasks?format=json&processInstanceId=" + processInstanceId;
String response = invokeResourceService(path);
return new TaskList(TaskList.PROCESS_TASKS, response).getItems();
}
} catch (IOException ex) {
throw new DataAccessOfflineException(ex.getMessage(), ex);
} catch (Exception ex) {
throw new DataAccessException(ex.getMessage(), ex);
}
}
Aggregations