feature #I5RV4W 加强脚本和java之间的互动
This commit is contained in:
parent
979c4ea070
commit
779321d08e
|
@ -51,7 +51,7 @@ public class ComponentInitializer {
|
|||
//默认retryForExceptions为Exception.class
|
||||
LiteflowRetry liteflowRetryAnnotation = AnnoUtil.getAnnotation(nodeComponent.getClass(), LiteflowRetry.class);
|
||||
LiteflowConfig liteflowConfig = LiteflowConfigGetter.get();
|
||||
if (ObjectUtil.isNotNull(liteflowRetryAnnotation)) {
|
||||
if (liteflowRetryAnnotation != null) {
|
||||
nodeComponent.setRetryCount(liteflowRetryAnnotation.retry());
|
||||
nodeComponent.setRetryForExceptions(liteflowRetryAnnotation.forExceptions());
|
||||
} else {
|
||||
|
|
|
@ -15,6 +15,7 @@ public class ScriptBreakComponent extends NodeBreakComponent implements ScriptCo
|
|||
wrap.setCurrChainName(this.getCurrChainName());
|
||||
wrap.setNodeId(this.getNodeId());
|
||||
wrap.setSlotIndex(this.getSlotIndex());
|
||||
wrap.setTag(this.getTag());
|
||||
wrap.setCmpData(this.getCmpData(Object.class));
|
||||
return (boolean) ScriptExecutorFactory.loadInstance().getScriptExecutor().execute(wrap);
|
||||
}
|
||||
|
|
|
@ -20,6 +20,7 @@ public class ScriptCommonComponent extends NodeComponent implements ScriptCompon
|
|||
wrap.setCurrChainName(this.getCurrChainName());
|
||||
wrap.setNodeId(this.getNodeId());
|
||||
wrap.setSlotIndex(this.getSlotIndex());
|
||||
wrap.setTag(this.getTag());
|
||||
wrap.setCmpData(this.getCmpData(Object.class));
|
||||
ScriptExecutorFactory.loadInstance().getScriptExecutor().execute(wrap);
|
||||
}
|
||||
|
|
|
@ -15,6 +15,7 @@ public class ScriptForComponent extends NodeForComponent implements ScriptCompon
|
|||
wrap.setCurrChainName(this.getCurrChainName());
|
||||
wrap.setNodeId(this.getNodeId());
|
||||
wrap.setSlotIndex(this.getSlotIndex());
|
||||
wrap.setTag(this.getTag());
|
||||
wrap.setCmpData(this.getCmpData(Object.class));
|
||||
return (int) ScriptExecutorFactory.loadInstance().getScriptExecutor().execute(wrap);
|
||||
}
|
||||
|
|
|
@ -15,6 +15,7 @@ public class ScriptIfComponent extends NodeIfComponent implements ScriptComponen
|
|||
wrap.setCurrChainName(this.getCurrChainName());
|
||||
wrap.setNodeId(this.getNodeId());
|
||||
wrap.setSlotIndex(this.getSlotIndex());
|
||||
wrap.setTag(this.getTag());
|
||||
wrap.setCmpData(this.getCmpData(Object.class));
|
||||
return (boolean)ScriptExecutorFactory.loadInstance().getScriptExecutor().execute(wrap);
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@ public class ScriptSwitchComponent extends NodeSwitchComponent implements Script
|
|||
wrap.setCurrChainName(this.getCurrChainName());
|
||||
wrap.setNodeId(this.getNodeId());
|
||||
wrap.setSlotIndex(this.getSlotIndex());
|
||||
wrap.setTag(this.getTag());
|
||||
wrap.setCmpData(this.getCmpData(Object.class));
|
||||
return (String)ScriptExecutorFactory.loadInstance().getScriptExecutor().execute(wrap);
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@ public class ScriptWhileComponent extends NodeWhileComponent implements ScriptCo
|
|||
wrap.setCurrChainName(this.getCurrChainName());
|
||||
wrap.setNodeId(this.getNodeId());
|
||||
wrap.setSlotIndex(this.getSlotIndex());
|
||||
wrap.setTag(this.getTag());
|
||||
wrap.setCmpData(this.getCmpData(Object.class));
|
||||
return (boolean) ScriptExecutorFactory.loadInstance().getScriptExecutor().execute(wrap);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue