|
@@ -149,7 +149,7 @@ public class ExecutorServiceImpl extends BaseServiceImpl implements ExecutorServ
|
|
|
|
|
|
// check process define release state
|
|
|
ProcessDefinition processDefinition = processDefinitionMapper.queryByCode(processDefinitionCode);
|
|
|
- result = checkProcessDefinitionValid(projectCode, processDefinition, processDefinitionCode);
|
|
|
+ result = checkProcessDefinitionValid(projectCode, processDefinition, processDefinitionCode, processDefinition.getVersion());
|
|
|
if (result.get(Constants.STATUS) != Status.SUCCESS) {
|
|
|
return result;
|
|
|
}
|
|
@@ -208,17 +208,18 @@ public class ExecutorServiceImpl extends BaseServiceImpl implements ExecutorServ
|
|
|
* @param projectCode project code
|
|
|
* @param processDefinition process definition
|
|
|
* @param processDefineCode process definition code
|
|
|
+ * @param version process instance verison
|
|
|
* @return check result code
|
|
|
*/
|
|
|
@Override
|
|
|
- public Map<String, Object> checkProcessDefinitionValid(long projectCode, ProcessDefinition processDefinition, long processDefineCode) {
|
|
|
+ public Map<String, Object> checkProcessDefinitionValid(long projectCode, ProcessDefinition processDefinition, long processDefineCode, Integer version) {
|
|
|
Map<String, Object> result = new HashMap<>();
|
|
|
if (processDefinition == null || projectCode != processDefinition.getProjectCode()) {
|
|
|
// check process definition exists
|
|
|
putMsg(result, Status.PROCESS_DEFINE_NOT_EXIST, String.valueOf(processDefineCode));
|
|
|
} else if (processDefinition.getReleaseState() != ReleaseState.ONLINE) {
|
|
|
// check process definition online
|
|
|
- putMsg(result, Status.PROCESS_DEFINE_NOT_RELEASE, String.valueOf(processDefineCode));
|
|
|
+ putMsg(result, Status.PROCESS_DEFINE_NOT_RELEASE, String.valueOf(processDefineCode), version);
|
|
|
} else if (!checkSubProcessDefinitionValid(processDefinition)){
|
|
|
// check sub process definition online
|
|
|
putMsg(result, Status.SUB_PROCESS_DEFINE_NOT_RELEASE);
|
|
@@ -290,7 +291,7 @@ public class ExecutorServiceImpl extends BaseServiceImpl implements ExecutorServ
|
|
|
ProcessDefinition processDefinition = processService.findProcessDefinition(processInstance.getProcessDefinitionCode(),
|
|
|
processInstance.getProcessDefinitionVersion());
|
|
|
if (executeType != ExecuteType.STOP && executeType != ExecuteType.PAUSE) {
|
|
|
- result = checkProcessDefinitionValid(projectCode, processDefinition, processInstance.getProcessDefinitionCode());
|
|
|
+ result = checkProcessDefinitionValid(projectCode, processDefinition, processInstance.getProcessDefinitionCode(), processInstance.getProcessDefinitionVersion());
|
|
|
if (result.get(Constants.STATUS) != Status.SUCCESS) {
|
|
|
return result;
|
|
|
}
|