|
|
@ -279,8 +279,7 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro |
|
|
|
return createDagDefine(loginUser, taskRelationList, processDefinition, taskDefinitionLogs, otherParamsJson); |
|
|
|
return createDagDefine(loginUser, taskRelationList, processDefinition, taskDefinitionLogs, otherParamsJson); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
private Map<String, Object> createDagDefine(User loginUser, |
|
|
|
public Map<String, Object> createDagDefine(User loginUser, |
|
|
|
|
|
|
|
List<ProcessTaskRelationLog> taskRelationList, |
|
|
|
List<ProcessTaskRelationLog> taskRelationList, |
|
|
|
ProcessDefinition processDefinition, |
|
|
|
ProcessDefinition processDefinition, |
|
|
|
List<TaskDefinitionLog> taskDefinitionLogs, String otherParamsJson) { |
|
|
|
List<TaskDefinitionLog> taskDefinitionLogs, String otherParamsJson) { |
|
|
@ -311,9 +310,7 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro |
|
|
|
return result; |
|
|
|
return result; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private Map<String, Object> checkTaskDefinitionList(List<TaskDefinitionLog> taskDefinitionLogs, String taskDefinitionJson) { |
|
|
|
@Override |
|
|
|
|
|
|
|
public Map<String, Object> checkTaskDefinitionList(List<TaskDefinitionLog> taskDefinitionLogs, String taskDefinitionJson) { |
|
|
|
|
|
|
|
Map<String, Object> result = new HashMap<>(); |
|
|
|
Map<String, Object> result = new HashMap<>(); |
|
|
|
try { |
|
|
|
try { |
|
|
|
if (taskDefinitionLogs.isEmpty()) { |
|
|
|
if (taskDefinitionLogs.isEmpty()) { |
|
|
@ -341,8 +338,7 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro |
|
|
|
return result; |
|
|
|
return result; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
private Map<String, Object> checkTaskRelationList(List<ProcessTaskRelationLog> taskRelationList, String taskRelationJson, List<TaskDefinitionLog> taskDefinitionLogs) { |
|
|
|
public Map<String, Object> checkTaskRelationList(List<ProcessTaskRelationLog> taskRelationList, String taskRelationJson, List<TaskDefinitionLog> taskDefinitionLogs) { |
|
|
|
|
|
|
|
Map<String, Object> result = new HashMap<>(); |
|
|
|
Map<String, Object> result = new HashMap<>(); |
|
|
|
try { |
|
|
|
try { |
|
|
|
if (taskRelationList == null || taskRelationList.isEmpty()) { |
|
|
|
if (taskRelationList == null || taskRelationList.isEmpty()) { |
|
|
@ -618,8 +614,7 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro |
|
|
|
return updateDagDefine(loginUser, taskRelationList, processDefinition, processDefinitionDeepCopy, taskDefinitionLogs, otherParamsJson); |
|
|
|
return updateDagDefine(loginUser, taskRelationList, processDefinition, processDefinitionDeepCopy, taskDefinitionLogs, otherParamsJson); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
private Map<String, Object> updateDagDefine(User loginUser, |
|
|
|
public Map<String, Object> updateDagDefine(User loginUser, |
|
|
|
|
|
|
|
List<ProcessTaskRelationLog> taskRelationList, |
|
|
|
List<ProcessTaskRelationLog> taskRelationList, |
|
|
|
ProcessDefinition processDefinition, |
|
|
|
ProcessDefinition processDefinition, |
|
|
|
ProcessDefinition processDefinitionDeepCopy, |
|
|
|
ProcessDefinition processDefinitionDeepCopy, |
|
|
@ -868,7 +863,7 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro |
|
|
|
/** |
|
|
|
/** |
|
|
|
* download the process definition file |
|
|
|
* download the process definition file |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public void downloadProcessDefinitionFile(HttpServletResponse response, List<DagDataSchedule> dagDataSchedules) { |
|
|
|
private void downloadProcessDefinitionFile(HttpServletResponse response, List<DagDataSchedule> dagDataSchedules) { |
|
|
|
response.setContentType(MediaType.APPLICATION_JSON_UTF8_VALUE); |
|
|
|
response.setContentType(MediaType.APPLICATION_JSON_UTF8_VALUE); |
|
|
|
BufferedOutputStream buff = null; |
|
|
|
BufferedOutputStream buff = null; |
|
|
|
ServletOutputStream out = null; |
|
|
|
ServletOutputStream out = null; |
|
|
@ -1148,7 +1143,7 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro |
|
|
|
/** |
|
|
|
/** |
|
|
|
* check and import
|
|
|
|
* check and import
|
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public boolean checkAndImport(User loginUser, long projectCode, Map<String, Object> result, DagDataSchedule dagDataSchedule, String otherParamsJson) { |
|
|
|
private boolean checkAndImport(User loginUser, long projectCode, Map<String, Object> result, DagDataSchedule dagDataSchedule, String otherParamsJson) { |
|
|
|
if (!checkImportanceParams(dagDataSchedule, result)) { |
|
|
|
if (!checkImportanceParams(dagDataSchedule, result)) { |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
@ -1637,7 +1632,7 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro |
|
|
|
* @param taskNodeResponseList task node response list |
|
|
|
* @param taskNodeResponseList task node response list |
|
|
|
* @return if graph has cycle flag |
|
|
|
* @return if graph has cycle flag |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public boolean graphHasCycle(List<TaskNode> taskNodeResponseList) { |
|
|
|
private boolean graphHasCycle(List<TaskNode> taskNodeResponseList) { |
|
|
|
DAG<String, TaskNode, String> graph = new DAG<>(); |
|
|
|
DAG<String, TaskNode, String> graph = new DAG<>(); |
|
|
|
// Fill the vertices
|
|
|
|
// Fill the vertices
|
|
|
|
for (TaskNode taskNodeResponse : taskNodeResponseList) { |
|
|
|
for (TaskNode taskNodeResponse : taskNodeResponseList) { |
|
|
@ -1738,8 +1733,7 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro |
|
|
|
return result; |
|
|
|
return result; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
private void doBatchOperateProcessDefinition(User loginUser, |
|
|
|
public void doBatchOperateProcessDefinition(User loginUser, |
|
|
|
|
|
|
|
long targetProjectCode, |
|
|
|
long targetProjectCode, |
|
|
|
List<String> failedProcessList, |
|
|
|
List<String> failedProcessList, |
|
|
|
String processDefinitionCodes, |
|
|
|
String processDefinitionCodes, |
|
|
@ -2045,8 +2039,7 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro |
|
|
|
return result; |
|
|
|
return result; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
private Map<String, Object> createDagSchedule(User loginUser, ProcessDefinition processDefinition, String scheduleJson) { |
|
|
|
public Map<String, Object> createDagSchedule(User loginUser, ProcessDefinition processDefinition, String scheduleJson) { |
|
|
|
|
|
|
|
Map<String, Object> result = new HashMap<>(); |
|
|
|
Map<String, Object> result = new HashMap<>(); |
|
|
|
Schedule scheduleObj = JSONUtils.parseObject(scheduleJson, Schedule.class); |
|
|
|
Schedule scheduleObj = JSONUtils.parseObject(scheduleJson, Schedule.class); |
|
|
|
if (scheduleObj == null) { |
|
|
|
if (scheduleObj == null) { |
|
|
@ -2169,8 +2162,7 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro |
|
|
|
return result; |
|
|
|
return result; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private Map<String, Object> updateDagSchedule(User loginUser, |
|
|
|
public Map<String, Object> updateDagSchedule(User loginUser, |
|
|
|
|
|
|
|
long projectCode, |
|
|
|
long projectCode, |
|
|
|
long processDefinitionCode, |
|
|
|
long processDefinitionCode, |
|
|
|
String scheduleJson) { |
|
|
|
String scheduleJson) { |
|
|
|