fix the exception of update null point of workflow instance due to no… (#4459)
* fix the exception of update null point of workflow instance due to not add global parameter when create workflow definition * optimization of the leading package Co-authored-by: yaoshui <huangqitao@accesscorporate.com.cn>
This commit is contained in:
parent
b6ce3cfdf0
commit
54e110d17b
|
|
@ -66,11 +66,13 @@ import java.io.InputStreamReader;
|
|||
import java.nio.charset.StandardCharsets;
|
||||
import java.text.ParseException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
|
|
@ -449,7 +451,7 @@ public class ProcessInstanceService extends BaseService {
|
|||
|
||||
originDefParams = JSONUtils.toJsonString(processData.getGlobalParams());
|
||||
List<Property> globalParamList = processData.getGlobalParams();
|
||||
Map<String, String> globalParamMap = globalParamList.stream().collect(Collectors.toMap(Property::getProp, Property::getValue));
|
||||
Map<String, String> globalParamMap = Optional.ofNullable(globalParamList).orElse(Collections.emptyList()).stream().collect(Collectors.toMap(Property::getProp, Property::getValue));
|
||||
globalParams = ParameterUtils.curingGlobalParams(globalParamMap, globalParamList,
|
||||
processInstance.getCmdTypeIfComplement(), schedule);
|
||||
timeout = processData.getTimeout();
|
||||
|
|
|
|||
Loading…
Reference in New Issue