24282 2 роки тому
батько
коміт
071fdf1cfe

+ 4 - 0
hx-flow/src/main/java/com/fjhx/flow/service/flow/impl/FlowExampleServiceImpl.java

@@ -169,6 +169,10 @@ public class FlowExampleServiceImpl extends ServiceImpl<FlowExampleMapper, FlowE
                 .eq(FlowDefinition::getFlowKey, dto.getFlowKey())
                 .eq(FlowDefinition::getCurrentVersion, StatusConstant.YES));
 
+        if (flowDefinition == null) {
+            throw new ServiceException("流程未配置,请联系管理员");
+        }
+
         // 获取流程全部节点
         List<FlowDefinitionNode> flowDefinitionNodeList = flowDefinitionNodeService.list(
                 q -> q.eq(FlowDefinitionNode::getFlowDefinitionId, flowDefinition.getId()));

+ 1 - 1
hx-flow/src/main/java/com/fjhx/flow/service/flow/impl/FlowProcessServiceImpl.java

@@ -76,7 +76,7 @@ public class FlowProcessServiceImpl implements FlowProcessService {
                 .eq(FlowDefinition::getCurrentVersion, StatusConstant.YES));
 
         if (flowDefinition == null) {
-            throw new ServiceException("没有找到可用流程");
+            throw new ServiceException("流程未配置,请联系管理员");
         }
 
         // 流程节点列表