Explorar o código

流程问题处理

yzc hai 1 ano
pai
achega
be82a8d7bc

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

@@ -705,15 +705,16 @@ public class FlowProcessServiceImpl implements FlowProcessService {
             for (FlowDefinitionNode flowDefinitionNode : nextNodeList) {
             for (FlowDefinitionNode flowDefinitionNode : nextNodeList) {
                 // 获取跳转条件
                 // 获取跳转条件
                 String jumpCondition = flowDefinitionNode.getJumpCondition();
                 String jumpCondition = flowDefinitionNode.getJumpCondition();
+                // 跳转条件为空表示默认跳转
+                if (StrUtil.isBlank(jumpCondition)) {
+                    nextNode = flowDefinitionNode;
+                    continue;
+                }
                 // 符合条件
                 // 符合条件
                 if (expressionResult(FlowThreadLocalUtil.getTemplateData(), jumpCondition)) {
                 if (expressionResult(FlowThreadLocalUtil.getTemplateData(), jumpCondition)) {
                     nextNode = flowDefinitionNode;
                     nextNode = flowDefinitionNode;
                     break;
                     break;
                 }
                 }
-                // 跳转条件为空表示默认跳转
-                if (StrUtil.isBlank(jumpCondition)) {
-                    nextNode = flowDefinitionNode;
-                }
             }
             }
             if (nextNode == null) {
             if (nextNode == null) {
                 throw new ServiceException("流程定义错误:分支节点未识别到有效跳转节点");
                 throw new ServiceException("流程定义错误:分支节点未识别到有效跳转节点");