update(REQ-2516) - 处理一些 NPE
This commit is contained in:
parent
1d1f9f240d
commit
355eed83f3
@ -27,6 +27,7 @@ import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
import static cn.axzo.workflow.core.common.code.BpmnInstanceRespCode.PROCESS_INSTANCE_NOT_EXISTS;
|
||||
import static cn.axzo.workflow.core.common.code.BpmnInstanceRespCode.RUNNING_INSTANCE_ONLY_FORECAST;
|
||||
|
||||
|
||||
/**
|
||||
@ -123,7 +124,9 @@ public class FlowNodeForecastService implements InitializingBean {
|
||||
// .includeProcessVariables()
|
||||
.singleResult();
|
||||
}
|
||||
|
||||
if (Objects.isNull(instance)) {
|
||||
throw new WorkflowEngineException(RUNNING_INSTANCE_ONLY_FORECAST);
|
||||
}
|
||||
BpmnModel bpmnModel = repositoryService.getBpmnModel(instance.getProcessDefinitionId());
|
||||
|
||||
// 保持推测出来的节点执行顺序的容器
|
||||
|
||||
Loading…
Reference in New Issue
Block a user