From eaa68adbb072fb07f5c9786965df8e3eaab84e05 Mon Sep 17 00:00:00 2001 From: "everywhere.z" Date: Tue, 11 Apr 2023 16:12:47 +0800 Subject: [PATCH] =?UTF-8?q?enhancement=20#I6RFOE=20LiteFlow=E8=83=BD?= =?UTF-8?q?=E5=90=A6=E5=9C=A8=E6=B5=81=E7=A8=8B=EF=BC=88=E8=A1=A8=E8=BE=BE?= =?UTF-8?q?=E5=BC=8F=EF=BC=89=E6=B7=BB=E5=8A=A0=E7=B1=BB=E4=BC=BCtag?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E7=9A=84=E5=B1=9E=E6=80=A7=EF=BC=8C=E6=8F=90?= =?UTF-8?q?=E9=AB=98=E9=80=89=E6=8B=A9=E7=BB=84=E4=BB=B6=E7=9A=84=E5=A4=8D?= =?UTF-8?q?=E7=94=A8=E7=8E=87=E5=91=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/yomahub/liteflow/core/ScriptIfComponent.java | 7 +------ .../com/yomahub/liteflow/core/ScriptSwitchComponent.java | 7 +------ .../com/yomahub/liteflow/core/ScriptWhileComponent.java | 7 +------ 3 files changed, 3 insertions(+), 18 deletions(-) diff --git a/liteflow-core/src/main/java/com/yomahub/liteflow/core/ScriptIfComponent.java b/liteflow-core/src/main/java/com/yomahub/liteflow/core/ScriptIfComponent.java index f808b93e0..a55cb8ed3 100644 --- a/liteflow-core/src/main/java/com/yomahub/liteflow/core/ScriptIfComponent.java +++ b/liteflow-core/src/main/java/com/yomahub/liteflow/core/ScriptIfComponent.java @@ -15,12 +15,7 @@ public class ScriptIfComponent extends NodeIfComponent implements ScriptComponen @Override public boolean processIf() throws Exception { - ScriptExecuteWrap wrap = new ScriptExecuteWrap(); - wrap.setCurrChainId(this.getCurrChainId()); - wrap.setNodeId(this.getNodeId()); - wrap.setSlotIndex(this.getSlotIndex()); - wrap.setTag(this.getTag()); - wrap.setCmpData(this.getCmpData(Map.class)); + ScriptExecuteWrap wrap = this.buildWrap(this); return (boolean) ScriptExecutorFactory.loadInstance() .getScriptExecutor(this.getRefNode().getLanguage()) .execute(wrap); diff --git a/liteflow-core/src/main/java/com/yomahub/liteflow/core/ScriptSwitchComponent.java b/liteflow-core/src/main/java/com/yomahub/liteflow/core/ScriptSwitchComponent.java index b22490b59..fa5aa3041 100644 --- a/liteflow-core/src/main/java/com/yomahub/liteflow/core/ScriptSwitchComponent.java +++ b/liteflow-core/src/main/java/com/yomahub/liteflow/core/ScriptSwitchComponent.java @@ -15,12 +15,7 @@ public class ScriptSwitchComponent extends NodeSwitchComponent implements Script @Override public String processSwitch() throws Exception { - ScriptExecuteWrap wrap = new ScriptExecuteWrap(); - wrap.setCurrChainId(this.getCurrChainId()); - wrap.setNodeId(this.getNodeId()); - wrap.setSlotIndex(this.getSlotIndex()); - wrap.setTag(this.getTag()); - wrap.setCmpData(this.getCmpData(Map.class)); + ScriptExecuteWrap wrap = this.buildWrap(this); return (String) ScriptExecutorFactory.loadInstance() .getScriptExecutor(this.getRefNode().getLanguage()) .execute(wrap); diff --git a/liteflow-core/src/main/java/com/yomahub/liteflow/core/ScriptWhileComponent.java b/liteflow-core/src/main/java/com/yomahub/liteflow/core/ScriptWhileComponent.java index f86eb088c..ef07d31e3 100644 --- a/liteflow-core/src/main/java/com/yomahub/liteflow/core/ScriptWhileComponent.java +++ b/liteflow-core/src/main/java/com/yomahub/liteflow/core/ScriptWhileComponent.java @@ -15,12 +15,7 @@ public class ScriptWhileComponent extends NodeWhileComponent implements ScriptCo @Override public boolean processWhile() throws Exception { - ScriptExecuteWrap wrap = new ScriptExecuteWrap(); - wrap.setCurrChainId(this.getCurrChainId()); - wrap.setNodeId(this.getNodeId()); - wrap.setSlotIndex(this.getSlotIndex()); - wrap.setTag(this.getTag()); - wrap.setCmpData(this.getCmpData(Map.class)); + ScriptExecuteWrap wrap = this.buildWrap(this); return (boolean) ScriptExecutorFactory.loadInstance() .getScriptExecutor(this.getRefNode().getLanguage()) .execute(wrap);