fix: Illegal nested workflow node

This commit is contained in:
Echo009 2022-03-31 15:22:34 +08:00
parent 3923937f6c
commit 2e1c585b5e

View File

@ -32,7 +32,10 @@ public class NestedWorkflowNodeValidator implements NodeValidator {
@Override
public void complexValidate(WorkflowNodeInfoDO node, WorkflowDAG dag) {
// do nothing
// 这里检查是否循环嵌套(自身引用自身)
if (Objects.equals(node.getJobId(), node.getWorkflowId())) {
throw new PowerJobException("Illegal nested workflow node,Prohibit circular references!" + node.getNodeName());
}
}