bug #ICWR6Q 解决在PARSE_ONE_ON_FIRST_EXEC模式下多次build chain时的tag不正确问题

This commit is contained in:
everywhere.z
2025-09-07 20:37:48 +08:00
parent a6fd30fd4a
commit cd369b3c39
3 changed files with 5 additions and 28 deletions

View File

@@ -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;

View File

@@ -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<Boolean> 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;
}
}

View File

@@ -39,7 +39,7 @@
</scm>
<properties>
<revision>2.15.0</revision>
<revision>2.15.0.1</revision>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.source>8</maven.compiler.source>