|
@@ -78,8 +78,8 @@ public class FlowDefine extends BaseEntity {
|
|
|
if (Objects.nonNull(node)) {
|
|
|
if (clazz.isInstance(node)) {
|
|
|
BranchNode branchNode = (BranchNode) node;
|
|
|
- List<ConditionNode> children = branchNode.getChildren();
|
|
|
- if (children.stream().anyMatch(c -> c.getId().equals(childId))) {
|
|
|
+ List<ConditionNode> branches = branchNode.getBranches();
|
|
|
+ if (branches.stream().anyMatch(c -> c.getId().equals(childId))) {
|
|
|
list.add(clazz.cast(node));
|
|
|
}
|
|
|
}
|
|
@@ -100,13 +100,13 @@ public class FlowDefine extends BaseEntity {
|
|
|
}
|
|
|
if (node instanceof BranchNode) {
|
|
|
BranchNode branchNode = (BranchNode) node;
|
|
|
- for (Node branch : branchNode.getChildren()) {
|
|
|
+ for (Node branch : branchNode.getBranches()) {
|
|
|
foundFlowNodes.addAll(flatNodesOfType(branch, clazz));
|
|
|
}
|
|
|
}
|
|
|
- Node child = node.getChild();
|
|
|
- if (child != null) {
|
|
|
- foundFlowNodes.addAll(flatNodesOfType(child, clazz));
|
|
|
+ Node next = node.getNext();
|
|
|
+ if (next != null) {
|
|
|
+ foundFlowNodes.addAll(flatNodesOfType(next, clazz));
|
|
|
}
|
|
|
return foundFlowNodes;
|
|
|
}
|
|
@@ -122,13 +122,13 @@ public class FlowDefine extends BaseEntity {
|
|
|
}
|
|
|
if (node instanceof BranchNode) {
|
|
|
BranchNode branchNode = (BranchNode) node;
|
|
|
- for (Node branch : branchNode.getChildren()) {
|
|
|
+ for (Node branch : branchNode.getBranches()) {
|
|
|
foundFlowNodes.addAll(findFlowNodesOfType(clazz, branch));
|
|
|
}
|
|
|
}
|
|
|
- Node child = node.getChild();
|
|
|
- if (child != null) {
|
|
|
- foundFlowNodes.addAll(findFlowNodesOfType(clazz, child));
|
|
|
+ Node next = node.getNext();
|
|
|
+ if (next != null) {
|
|
|
+ foundFlowNodes.addAll(findFlowNodesOfType(clazz, next));
|
|
|
}
|
|
|
return foundFlowNodes;
|
|
|
}
|
|
@@ -146,14 +146,14 @@ public class FlowDefine extends BaseEntity {
|
|
|
}
|
|
|
if (node instanceof BranchNode) {
|
|
|
BranchNode branchNode = (BranchNode) node;
|
|
|
- for (Node branch : branchNode.getChildren()) {
|
|
|
+ for (Node branch : branchNode.getBranches()) {
|
|
|
T result = findFlowNodeOfType(clazz, nodeId, branch);
|
|
|
if (Objects.nonNull(result)) return result;
|
|
|
}
|
|
|
}
|
|
|
- Node child = node.getChild();
|
|
|
- if (child != null) {
|
|
|
- T result = findFlowNodeOfType(clazz, nodeId, child);
|
|
|
+ Node next = node.getNext();
|
|
|
+ if (next != null) {
|
|
|
+ T result = findFlowNodeOfType(clazz, nodeId, next);
|
|
|
if (Objects.nonNull(result)) return result;
|
|
|
}
|
|
|
return null;
|
|
@@ -204,11 +204,11 @@ public class FlowDefine extends BaseEntity {
|
|
|
listOfAllNodes.add(node);
|
|
|
if (node instanceof BranchNode) {
|
|
|
BranchNode branchNode = (BranchNode) node;
|
|
|
- for (Node branch : branchNode.getChildren()) {
|
|
|
+ for (Node branch : branchNode.getBranches()) {
|
|
|
collectSubNodes(branch, listOfAllNodes);
|
|
|
}
|
|
|
}
|
|
|
- collectSubNodes(node.getChild(), listOfAllNodes);
|
|
|
+ collectSubNodes(node.getNext(), listOfAllNodes);
|
|
|
}
|
|
|
}
|
|
|
|