[FIX-4247][Api]Fixed the problem that the global parameters are not updated after the workflow instance click rerun

Co-authored-by: zt-1997 <“18841012545@163.com”>
This commit is contained in:
zt-1997 2021-01-17 13:04:00 +08:00 committed by GitHub
parent 00829b99fd
commit fff06bf8b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -687,6 +687,12 @@ public class ProcessService {
processInstance = generateNewProcessInstance(processDefinition, command, cmdParam);
} else {
processInstance = this.findProcessInstanceDetailById(processInstanceId);
// Recalculate global parameters after rerun.
processInstance.setGlobalParams(ParameterUtils.curingGlobalParams(
processDefinition.getGlobalParamMap(),
processDefinition.getGlobalParamList(),
getCommandTypeIfComplement(processInstance, command),
processInstance.getScheduleTime()));
}
processDefinition = processDefineMapper.selectById(processInstance.getProcessDefinitionId());
processInstance.setProcessDefinition(processDefinition);