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