feat(REQ-5965) - 解决流程没有传入自定义文档时的NPE

This commit is contained in:
wangli 2025-11-10 15:27:38 +08:00
parent 62aec2b9ee
commit 91e81a9a78

View File

@ -22,6 +22,7 @@ import cn.axzo.workflow.core.service.ExtAxReModelService;
import cn.axzo.workflow.server.common.util.RpcExternalUtil;
import cn.axzo.workflow.server.common.util.WpsUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.ListUtils;
import org.flowable.bpmn.model.Process;
import org.flowable.common.engine.impl.interceptor.CommandExecutor;
import org.flowable.engine.RuntimeService;
@ -102,7 +103,7 @@ public class FirstCopyTemplateFileTaskEvent_105_Listener extends AbstractBpmnEve
// 业务自定义文档
RuntimeService runtimeService = processEngineConfiguration.getRuntimeService();
List<CustomDocDTO> customDocs = runtimeService.getVariable(processInstanceId, SIGN_BIZ_CUSTOM_DOCS, List.class);
List<CustomDocDTO> customDocs = ListUtils.emptyIfNull(runtimeService.getVariable(processInstanceId, SIGN_BIZ_CUSTOM_DOCS, List.class));
if (CollectionUtils.isEmpty(docs)) {
processSign.setDocTemplate(Collections.emptyList());