mirror of
https://gitee.com/dromara/liteFlow.git
synced 2026-05-14 04:02:09 +08:00
增加 liteflow.enable-node-instance-id 配置项
This commit is contained in:
@@ -223,7 +223,9 @@ public class LiteFlowChainELBuilder {
|
||||
throw new QLException(StrUtil.format("parse el fail,el:[{}]", elStr));
|
||||
}
|
||||
|
||||
setNodesInstanceId(condition);
|
||||
if (liteflowConfig.getEnableNodeInstanceId()) {
|
||||
setNodesInstanceId(condition);
|
||||
}
|
||||
|
||||
// 把主要的condition加入
|
||||
this.conditionList.add(condition);
|
||||
|
||||
@@ -124,6 +124,9 @@ public class LiteflowConfig {
|
||||
//脚本特殊设置选项
|
||||
private Map<String, String> scriptSetting;
|
||||
|
||||
//是否启用节点实例ID
|
||||
private Boolean enableNodeInstanceId;
|
||||
|
||||
public Boolean getEnableMonitorFile() {
|
||||
return enableMonitorFile;
|
||||
}
|
||||
@@ -509,4 +512,16 @@ public class LiteflowConfig {
|
||||
public void setScriptSetting(Map<String, String> scriptSetting) {
|
||||
this.scriptSetting = scriptSetting;
|
||||
}
|
||||
|
||||
public Boolean getEnableNodeInstanceId() {
|
||||
if (ObjectUtil.isNull(enableNodeInstanceId)) {
|
||||
return Boolean.FALSE;
|
||||
} else {
|
||||
return enableNodeInstanceId;
|
||||
}
|
||||
}
|
||||
|
||||
public void setEnableNodeInstanceId(Boolean enableNodeInstanceId) {
|
||||
this.enableNodeInstanceId = enableNodeInstanceId;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,6 +51,7 @@ public class LiteflowAutoConfiguration {
|
||||
liteflowConfig.setParallelQueueLimit(property.getParallelQueueLimit());
|
||||
liteflowConfig.setParallelLoopExecutorClass(property.getParallelLoopExecutorClass());
|
||||
liteflowConfig.setFallbackCmpEnable(property.isFallbackCmpEnable());
|
||||
liteflowConfig.setEnableNodeInstanceId(property.isEnableNodeInstanceId());
|
||||
return liteflowConfig;
|
||||
}
|
||||
|
||||
|
||||
@@ -83,6 +83,9 @@ public class LiteflowProperty {
|
||||
// 是否启用组件降级
|
||||
private Boolean fallbackCmpEnable;
|
||||
|
||||
//是否启用节点实例ID
|
||||
private boolean enableNodeInstanceId;
|
||||
|
||||
public boolean isEnable() {
|
||||
return enable;
|
||||
}
|
||||
@@ -267,4 +270,12 @@ public class LiteflowProperty {
|
||||
public Boolean getFallbackCmpEnable() {
|
||||
return fallbackCmpEnable;
|
||||
}
|
||||
|
||||
public boolean isEnableNodeInstanceId() {
|
||||
return enableNodeInstanceId;
|
||||
}
|
||||
|
||||
public void setEnableNodeInstanceId(boolean enableNodeInstanceId) {
|
||||
this.enableNodeInstanceId = enableNodeInstanceId;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,3 +18,4 @@ liteflow.monitor.queue-limit=200
|
||||
liteflow.monitor.delay=300000
|
||||
liteflow.monitor.period=300000
|
||||
liteflow.fallback-cmp-enable=false
|
||||
liteflow.enable-node-instance-id=true
|
||||
|
||||
@@ -101,6 +101,9 @@ public class LiteflowProperty {
|
||||
//脚本特殊设置选项
|
||||
private Map<String, String> scriptSetting;
|
||||
|
||||
//是否启用节点实例ID
|
||||
private boolean enableNodeInstanceId;
|
||||
|
||||
public boolean isEnableMonitorFile() {
|
||||
return enableMonitorFile;
|
||||
}
|
||||
@@ -336,4 +339,12 @@ public class LiteflowProperty {
|
||||
public void setScriptSetting(Map<String, String> scriptSetting) {
|
||||
this.scriptSetting = scriptSetting;
|
||||
}
|
||||
|
||||
public boolean isEnableNodeInstanceId() {
|
||||
return enableNodeInstanceId;
|
||||
}
|
||||
|
||||
public void setEnableNodeInstanceId(boolean enableNodeInstanceId) {
|
||||
this.enableNodeInstanceId = enableNodeInstanceId;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,6 +54,7 @@ public class LiteflowPropertyAutoConfiguration {
|
||||
liteflowConfig.setDelay(liteflowMonitorProperty.getDelay());
|
||||
liteflowConfig.setPeriod(liteflowMonitorProperty.getPeriod());
|
||||
liteflowConfig.setScriptSetting(property.getScriptSetting());
|
||||
liteflowConfig.setEnableNodeInstanceId(property.isEnableNodeInstanceId());
|
||||
return liteflowConfig;
|
||||
}
|
||||
|
||||
|
||||
@@ -220,6 +220,13 @@
|
||||
"type": "java.util.Map",
|
||||
"description": "script special settings.",
|
||||
"sourceType": "com.yomahub.liteflow.springboot.LiteflowProperty"
|
||||
},
|
||||
{
|
||||
"name": "liteflow.enable-node-instance-id",
|
||||
"type": "java.lang.Boolean",
|
||||
"description": "enable node instance id",
|
||||
"sourceType": "com.yomahub.liteflow.springboot.LiteflowProperty",
|
||||
"defaultValue": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -26,4 +26,5 @@ liteflow.monitor.queue-limit=200
|
||||
liteflow.monitor.delay=300000
|
||||
liteflow.monitor.period=300000
|
||||
liteflow.enable-monitor-file=false
|
||||
liteflow.enable-node-instance-id=true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user