mirror of
https://gitee.com/dromara/liteFlow.git
synced 2026-06-11 17:26:54 +08:00
@@ -49,8 +49,6 @@ public abstract class NodeComponent{
|
||||
|
||||
private String name;
|
||||
|
||||
private String instanceId;
|
||||
|
||||
private NodeTypeEnum type;
|
||||
|
||||
// 这是自己的实例,取代this
|
||||
@@ -88,7 +86,7 @@ public abstract class NodeComponent{
|
||||
Slot slot = this.getSlot();
|
||||
|
||||
// 在元数据里加入step信息
|
||||
CmpStep cmpStep = new CmpStep(nodeId, name, CmpStepTypeEnum.SINGLE, instanceId);
|
||||
CmpStep cmpStep = new CmpStep(nodeId, name, CmpStepTypeEnum.SINGLE);
|
||||
cmpStep.setTag(this.getTag());
|
||||
cmpStep.setInstance(this);
|
||||
cmpStep.setRefNode(this.getRefNode());
|
||||
@@ -162,7 +160,7 @@ public abstract class NodeComponent{
|
||||
return;
|
||||
}
|
||||
|
||||
CmpStep cmpStep = new CmpStep(nodeId, name, CmpStepTypeEnum.SINGLE, instanceId);
|
||||
CmpStep cmpStep = new CmpStep(nodeId, name, CmpStepTypeEnum.SINGLE);
|
||||
cmpStep.setTag(this.getTag());
|
||||
cmpStep.setInstance(this);
|
||||
cmpStep.setRefNode(this.getRefNode());
|
||||
@@ -329,13 +327,7 @@ public abstract class NodeComponent{
|
||||
public void setNodeExecutorClass(Class<? extends NodeExecutor> nodeExecutorClass) {
|
||||
this.nodeExecutorClass = nodeExecutorClass;
|
||||
}
|
||||
public String getInstanceId() {
|
||||
return instanceId;
|
||||
}
|
||||
|
||||
public void setInstanceId(String instanceId) {
|
||||
this.instanceId = instanceId;
|
||||
}
|
||||
public String getTag() {
|
||||
return this.getRefNode().getTag();
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ public class Node implements Executable, Cloneable, Rollbackable{
|
||||
|
||||
private String id;
|
||||
|
||||
private String instanceId;
|
||||
private String nodeInstanceId;
|
||||
|
||||
private String name;
|
||||
|
||||
@@ -126,12 +126,12 @@ public class Node implements Executable, Cloneable, Rollbackable{
|
||||
return id;
|
||||
}
|
||||
|
||||
public String getInstanceId() {
|
||||
return instanceId;
|
||||
public String getNodeInstanceId() {
|
||||
return nodeInstanceId;
|
||||
}
|
||||
|
||||
public void setInstanceId(String instanceId) {
|
||||
this.instanceId = instanceId;
|
||||
public void setNodeInstanceId(String nodeInstanceId) {
|
||||
this.nodeInstanceId = nodeInstanceId;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -192,7 +192,6 @@ public class Node implements Executable, Cloneable, Rollbackable{
|
||||
// 把线程属性赋值给组件对象
|
||||
this.setSlotIndex(slotIndex);
|
||||
instance.setRefNode(this);
|
||||
instance.setInstanceId(this.instanceId);
|
||||
|
||||
// 判断是否可执行,所以isAccess经常作为一个组件进入的实际判断要素,用作检查slot里的参数的完备性
|
||||
if (getAccessResult() || instance.isAccess()) {
|
||||
|
||||
@@ -24,7 +24,7 @@ import java.util.Date;
|
||||
*/
|
||||
public class CmpStep {
|
||||
|
||||
private String instanceId;
|
||||
private String nodeInstanceId;
|
||||
|
||||
private String nodeId;
|
||||
|
||||
@@ -60,19 +60,18 @@ public class CmpStep {
|
||||
private Object stepData;
|
||||
|
||||
|
||||
public CmpStep(String nodeId, String nodeName, CmpStepTypeEnum stepType, String instanceId) {
|
||||
public CmpStep(String nodeId, String nodeName, CmpStepTypeEnum stepType) {
|
||||
this.nodeId = nodeId;
|
||||
this.nodeName = nodeName;
|
||||
this.stepType = stepType;
|
||||
this.instanceId = instanceId;
|
||||
}
|
||||
|
||||
public String getInstanceId() {
|
||||
return instanceId;
|
||||
public String getNodeInstanceId() {
|
||||
return nodeInstanceId;
|
||||
}
|
||||
|
||||
public void setInstanceId(String instanceId) {
|
||||
this.instanceId = instanceId;
|
||||
public void setNodeInstanceId(String nodeInstanceId) {
|
||||
this.nodeInstanceId = nodeInstanceId;
|
||||
}
|
||||
|
||||
public String getNodeId() {
|
||||
@@ -144,6 +143,7 @@ public class CmpStep {
|
||||
}
|
||||
|
||||
public void setRefNode(Node refNode) {
|
||||
this.nodeInstanceId = refNode.getNodeInstanceId();
|
||||
this.refNode = refNode;
|
||||
}
|
||||
|
||||
@@ -164,7 +164,7 @@ public class CmpStep {
|
||||
|
||||
public String buildStringWithInstanceId() {
|
||||
if (stepType.equals(CmpStepTypeEnum.SINGLE)) {
|
||||
return StrUtil.format("{}[{}]", nodeId, instanceId);
|
||||
return StrUtil.format("{}[{}]", nodeId, nodeInstanceId);
|
||||
}
|
||||
else {
|
||||
// 目前没有其他的类型
|
||||
|
||||
@@ -95,7 +95,7 @@ public abstract class BaseNodeInstanceIdManageSpi implements NodeInstanceIdManag
|
||||
List<Node> allNodeInCondition = condition.getAllNodeInCondition();
|
||||
|
||||
for (Node node : allNodeInCondition) {
|
||||
if (Objects.equals(node.getInstanceId(), instanceId)) {
|
||||
if (Objects.equals(node.getNodeInstanceId(), instanceId)) {
|
||||
return node;
|
||||
}
|
||||
}
|
||||
@@ -191,7 +191,7 @@ public abstract class BaseNodeInstanceIdManageSpi implements NodeInstanceIdManag
|
||||
if (Objects.equals(dto.getNodeId(), node.getId())
|
||||
&& Objects.equals(dto.getChainId(), chainId)
|
||||
&& Objects.equals(dto.getIndex(), idCntMap.get(node.getId()))) {
|
||||
node.setInstanceId(dto.getInstanceId());
|
||||
node.setNodeInstanceId(dto.getInstanceId());
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -232,7 +232,7 @@ public abstract class BaseNodeInstanceIdManageSpi implements NodeInstanceIdManag
|
||||
|
||||
String instanceId = node.getId() + "_" + shortUUID + "_" + idCntMap.get(node.getId());
|
||||
|
||||
node.setInstanceId(instanceId);
|
||||
node.setNodeInstanceId(instanceId);
|
||||
instanceInfoDto.setInstanceId(instanceId);
|
||||
instanceInfoDto.setIndex(idCntMap.get(node.getId()));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user