From cd369b3c3989f37d9ccebc383a1bfb0d57ae9acf Mon Sep 17 00:00:00 2001 From: "everywhere.z" Date: Sun, 7 Sep 2025 20:37:48 +0800 Subject: [PATCH] =?UTF-8?q?bug=20#ICWR6Q=20=E8=A7=A3=E5=86=B3=E5=9C=A8PARS?= =?UTF-8?q?E=5FONE=5FON=5FFIRST=5FEXEC=E6=A8=A1=E5=BC=8F=E4=B8=8B=E5=A4=9A?= =?UTF-8?q?=E6=AC=A1build=20chain=E6=97=B6=E7=9A=84tag=E4=B8=8D=E6=AD=A3?= =?UTF-8?q?=E7=A1=AE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../el/operator/base/OperatorHelper.java | 6 +---- .../yomahub/liteflow/flow/element/Node.java | 25 +++---------------- pom.xml | 2 +- 3 files changed, 5 insertions(+), 28 deletions(-) diff --git a/liteflow-core/src/main/java/com/yomahub/liteflow/builder/el/operator/base/OperatorHelper.java b/liteflow-core/src/main/java/com/yomahub/liteflow/builder/el/operator/base/OperatorHelper.java index a407639ba..31107a9d9 100644 --- a/liteflow-core/src/main/java/com/yomahub/liteflow/builder/el/operator/base/OperatorHelper.java +++ b/liteflow-core/src/main/java/com/yomahub/liteflow/builder/el/operator/base/OperatorHelper.java @@ -131,11 +131,7 @@ public class OperatorHelper { if (clazz.isAssignableFrom(object.getClass())) { if (object instanceof Node) { Node node = (Node) object; - if (node.isCloned()){ - return (T) node; - }else { - return (T) node.clone(); - } + return (T) node.clone(); } else { return (T) object; diff --git a/liteflow-core/src/main/java/com/yomahub/liteflow/flow/element/Node.java b/liteflow-core/src/main/java/com/yomahub/liteflow/flow/element/Node.java index 74c3717b3..ae20408fc 100644 --- a/liteflow-core/src/main/java/com/yomahub/liteflow/flow/element/Node.java +++ b/liteflow-core/src/main/java/com/yomahub/liteflow/flow/element/Node.java @@ -73,10 +73,6 @@ public class Node implements Executable, Cloneable, Rollbackable{ // 针对于脚本节点,这个属性代表脚本节点的脚本是否已经编译过 private volatile boolean isCompiled = true; - // 此属性代表在EL构建的时候,node节点是否已经从FLowBus中的nodeMap中clone过了。 - // 如果已经clone过了,不再Clone - private boolean isCloned = false; - // node 的 isAccess 结果,主要用于 WhenCondition 的提前 isAccess 判断,避免 isAccess 方法重复执行 private TransmittableThreadLocal accessResult = new TransmittableThreadLocal<>(); @@ -147,9 +143,6 @@ public class Node implements Executable, Cloneable, Rollbackable{ @Override public void setTag(String tag) { this.tag = tag; - if (BooleanUtil.isFalse(this.isCloned)){ - this.setCloned(true); - } } public String getName() { @@ -306,9 +299,6 @@ public class Node implements Executable, Cloneable, Rollbackable{ public void setCmpData(String cmpData) { this.cmpData = cmpData; - if (BooleanUtil.isFalse(this.isCloned)){ - this.setCloned(true); - } } @Override @@ -522,9 +512,6 @@ public class Node implements Executable, Cloneable, Rollbackable{ public void putBindData(String key, String value) { this.bindDataMap.put(key, value); - if (BooleanUtil.isFalse(this.isCloned)){ - this.setCloned(true); - } } public boolean hasBindData(String key){ @@ -535,14 +522,6 @@ public class Node implements Executable, Cloneable, Rollbackable{ return this.bindDataMap.get(key); } - public boolean isCloned() { - return isCloned; - } - - public void setCloned(boolean cloned) { - isCloned = cloned; - } - public Object getStepData(){ return this.stepDataTL.get(); } @@ -606,7 +585,9 @@ public class Node implements Executable, Cloneable, Rollbackable{ node.stepDataTL = new ThreadLocal<>(); node.lock4LoopIndex = new ReentrantLock(); node.lock4LoopObj = new ReentrantLock(); - node.bindDataMap = new HashMap<>(); + node.tag = this.tag; + node.cmpData = this.cmpData; + node.bindDataMap = new HashMap<>(this.bindDataMap); return node; } } diff --git a/pom.xml b/pom.xml index 30b35662a..dec237861 100644 --- a/pom.xml +++ b/pom.xml @@ -39,7 +39,7 @@ - 2.15.0 + 2.15.0.1 UTF-8 UTF-8 8