【功能修复】工作流:新建的流程,部分数据的 NPE 问题

This commit is contained in:
YunaiV 2024-10-04 11:47:39 +08:00
parent ad0d9d10c8
commit 4687dfbb97

View File

@ -21,6 +21,7 @@ import org.flowable.engine.repository.ProcessDefinition;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
import java.util.Collections;
import java.util.List;
import java.util.Map;
@ -101,7 +102,17 @@ public interface BpmModelConvert {
}
default BpmModelMetaInfoVO parseMetaInfo(Model model) {
return JsonUtils.parseObject(model.getMetaInfo(), BpmModelMetaInfoVO.class);
BpmModelMetaInfoVO vo = JsonUtils.parseObject(model.getMetaInfo(), BpmModelMetaInfoVO.class);
if (vo == null) {
return null;
}
if (vo.getManagerUserIds() == null) {
vo.setManagerUserIds(Collections.emptyList());
}
if (vo.getStartUserIds() == null) {
vo.setStartUserIds(Collections.emptyList());
}
return vo;
}
}