From 9b7e69d7393226d62c38e3b78c66daa7c6725076 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=87=91=E9=97=AA=E9=97=AA?= <66009687@qq.com> Date: Sun, 24 May 2026 01:54:02 +0000 Subject: [PATCH 1/2] fix: fix NPE in NotCondition.executeCondition when getItemResultMetaValue returns null --- .../liteflow/flow/element/condition/NotCondition.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/liteflow-core/src/main/java/com/yomahub/liteflow/flow/element/condition/NotCondition.java b/liteflow-core/src/main/java/com/yomahub/liteflow/flow/element/condition/NotCondition.java index d937b5050..867da9a41 100644 --- a/liteflow-core/src/main/java/com/yomahub/liteflow/flow/element/condition/NotCondition.java +++ b/liteflow-core/src/main/java/com/yomahub/liteflow/flow/element/condition/NotCondition.java @@ -20,7 +20,8 @@ public class NotCondition extends Condition { item.setCurrChainId(this.getCurrChainId()); item.execute(slotIndex); - boolean flag = item.getItemResultMetaValue(slotIndex); + Boolean resultValue = item.getItemResultMetaValue(slotIndex); + boolean flag = BooleanUtil.isTrue(resultValue); LOG.info("the result of boolean component [{}] is [{}]", item.getId(), flag); @@ -52,4 +53,4 @@ public class NotCondition extends Condition { return this.getExecutableOne(ConditionKey.NOT_ITEM_KEY); } -} +} \ No newline at end of file -- Gitee From 793a99cbd9f3a67acac5916a95ab1b869ec2ee52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=87=91=E9=97=AA=E9=97=AA?= <66009687@qq.com> Date: Sun, 24 May 2026 01:54:03 +0000 Subject: [PATCH 2/2] fix: change catch log level from error to warn, exception is handled properly --- .../liteflow/flow/element/condition/CatchCondition.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/liteflow-core/src/main/java/com/yomahub/liteflow/flow/element/condition/CatchCondition.java b/liteflow-core/src/main/java/com/yomahub/liteflow/flow/element/condition/CatchCondition.java index 4c52d5856..366ec7173 100644 --- a/liteflow-core/src/main/java/com/yomahub/liteflow/flow/element/condition/CatchCondition.java +++ b/liteflow-core/src/main/java/com/yomahub/liteflow/flow/element/condition/CatchCondition.java @@ -37,7 +37,7 @@ public class CatchCondition extends Condition { //ChainEndException属于用户主动结束流程,不应该进入Catch的流程 throw e; }catch (Exception e) { - LOG.error("catch exception:" + e.getMessage(), e); + LOG.warn("catch exception (handled):" + e.getMessage(), e); Executable doExecutable = this.getDoItem(); if (ObjectUtil.isNotNull(doExecutable)) { doExecutable.setCurrChainId(this.getCurrChainId()); @@ -70,4 +70,4 @@ public class CatchCondition extends Condition { this.addExecutable(ConditionKey.DO_KEY, executable); } -} +} \ No newline at end of file -- Gitee