|
|
|
@ -382,24 +382,25 @@ public class ProcessDefinitionService extends BaseDAGService {
|
|
|
|
|
return checkProcessJson; |
|
|
|
|
} |
|
|
|
|
ProcessDefinition processDefine = processService.findProcessDefineById(id); |
|
|
|
|
if (!name.equals(processDefine.getName())) { |
|
|
|
|
ProcessDefinition definition = processDefineMapper.verifyByDefineName(project.getId(), name); |
|
|
|
|
if (definition != null) { |
|
|
|
|
putMsg(result, Status.VERIFY_PROCESS_DEFINITION_NAME_UNIQUE_ERROR, name); |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// check process definition exists
|
|
|
|
|
if (processDefine == null) { |
|
|
|
|
// check process definition exists
|
|
|
|
|
putMsg(result, Status.PROCESS_DEFINE_NOT_EXIST, id); |
|
|
|
|
return result; |
|
|
|
|
} else if (processDefine.getReleaseState() == ReleaseState.ONLINE) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (processDefine.getReleaseState() == ReleaseState.ONLINE) { |
|
|
|
|
// online can not permit edit
|
|
|
|
|
putMsg(result, Status.PROCESS_DEFINE_NOT_ALLOWED_EDIT, processDefine.getName()); |
|
|
|
|
return result; |
|
|
|
|
} else { |
|
|
|
|
putMsg(result, Status.SUCCESS); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (!name.equals(processDefine.getName())) { |
|
|
|
|
// check whether the new process define name exist
|
|
|
|
|
ProcessDefinition definition = processDefineMapper.verifyByDefineName(project.getId(), name); |
|
|
|
|
if (definition != null) { |
|
|
|
|
putMsg(result, Status.VERIFY_PROCESS_DEFINITION_NAME_UNIQUE_ERROR, name); |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Date now = new Date(); |
|
|
|
|