Skip to content

Commit

Permalink
issue 8645 (#8811)
Browse files Browse the repository at this point in the history
Co-authored-by: 北笙 <“zhanqian@cai-inc.com”>
Co-authored-by: zhanqian <zhanqian@cai-inc.com>
  • Loading branch information
3 people authored Mar 10, 2022
1 parent 53fcffe commit e466f54
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1108,16 +1108,20 @@ private boolean checkAndImport(User loginUser, long projectCode, Map<String, Obj
return false;
}
ProcessDefinition processDefinition = dagDataSchedule.getProcessDefinition();

// generate import processDefinitionName
String processDefinitionName = recursionProcessDefinitionName(projectCode, processDefinition.getName(), 1);
String importProcessDefinitionName = processDefinitionName + "_import_" + DateUtils.getCurrentTimeStamp();

//unique check
Map<String, Object> checkResult = verifyProcessDefinitionName(loginUser, projectCode, processDefinition.getName());
Map<String, Object> checkResult = verifyProcessDefinitionName(loginUser, projectCode, importProcessDefinitionName);
if (Status.SUCCESS.equals(checkResult.get(Constants.STATUS))) {
putMsg(result, Status.SUCCESS);
} else {
result.putAll(checkResult);
return false;
}
String processDefinitionName = recursionProcessDefinitionName(projectCode, processDefinition.getName(), 1);
processDefinition.setName(processDefinitionName + "_import_" + DateUtils.getCurrentTimeStamp());
processDefinition.setName(importProcessDefinitionName);
processDefinition.setId(0);
processDefinition.setProjectCode(projectCode);
processDefinition.setUserId(loginUser.getId());
Expand Down

0 comments on commit e466f54

Please sign in to comment.