|
|
|
@ -909,6 +909,7 @@ public class ExecutorServiceImpl extends BaseServiceImpl implements ExecutorServ
|
|
|
|
|
// and causing duplicate when clone it.
|
|
|
|
|
dependentCommand.setId(null); |
|
|
|
|
dependentCommand.setProcessDefinitionCode(dependentProcessDefinition.getProcessDefinitionCode()); |
|
|
|
|
dependentCommand.setProcessDefinitionVersion(dependentProcessDefinition.getProcessDefinitionVersion()); |
|
|
|
|
dependentCommand.setWorkerGroup(dependentProcessDefinition.getWorkerGroup()); |
|
|
|
|
Map<String, String> cmdParam = JSONUtils.toMap(dependentCommand.getCommandParam()); |
|
|
|
|
cmdParam.put(CMD_PARAM_START_NODES, String.valueOf(dependentProcessDefinition.getTaskDefinitionCode())); |
|
|
|
@ -929,7 +930,7 @@ public class ExecutorServiceImpl extends BaseServiceImpl implements ExecutorServ
|
|
|
|
|
processService.queryDependentProcessDefinitionByProcessDefinitionCode(processDefinitionCode); |
|
|
|
|
|
|
|
|
|
return checkDependentProcessDefinitionValid(dependentProcessDefinitionList, processDefinitionCycle, |
|
|
|
|
workerGroup); |
|
|
|
|
workerGroup, processDefinitionCode); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -940,7 +941,8 @@ public class ExecutorServiceImpl extends BaseServiceImpl implements ExecutorServ
|
|
|
|
|
private List<DependentProcessDefinition> checkDependentProcessDefinitionValid( |
|
|
|
|
List<DependentProcessDefinition> dependentProcessDefinitionList, |
|
|
|
|
CycleEnum processDefinitionCycle, |
|
|
|
|
String workerGroup) { |
|
|
|
|
String workerGroup, |
|
|
|
|
long upstreamProcessDefinitionCode) { |
|
|
|
|
List<DependentProcessDefinition> validDependentProcessDefinitionList = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
List<Long> processDefinitionCodeList = |
|
|
|
@ -951,7 +953,7 @@ public class ExecutorServiceImpl extends BaseServiceImpl implements ExecutorServ
|
|
|
|
|
processService.queryWorkerGroupByProcessDefinitionCodes(processDefinitionCodeList); |
|
|
|
|
|
|
|
|
|
for (DependentProcessDefinition dependentProcessDefinition : dependentProcessDefinitionList) { |
|
|
|
|
if (dependentProcessDefinition.getDependentCycle() == processDefinitionCycle) { |
|
|
|
|
if (dependentProcessDefinition.getDependentCycle(upstreamProcessDefinitionCode) == processDefinitionCycle) { |
|
|
|
|
if (processDefinitionWorkerGroupMap |
|
|
|
|
.get(dependentProcessDefinition.getProcessDefinitionCode()) == null) { |
|
|
|
|
dependentProcessDefinition.setWorkerGroup(workerGroup); |
|
|
|
|