|
|
@ -22,6 +22,7 @@ import org.apache.dolphinscheduler.common.graph.DAG; |
|
|
|
import org.apache.dolphinscheduler.common.model.TaskNode; |
|
|
|
import org.apache.dolphinscheduler.common.model.TaskNode; |
|
|
|
import org.apache.dolphinscheduler.common.model.TaskNodeRelation; |
|
|
|
import org.apache.dolphinscheduler.common.model.TaskNodeRelation; |
|
|
|
import org.apache.dolphinscheduler.common.process.ProcessDag; |
|
|
|
import org.apache.dolphinscheduler.common.process.ProcessDag; |
|
|
|
|
|
|
|
import org.apache.dolphinscheduler.common.task.conditions.ConditionsParameters; |
|
|
|
import org.apache.dolphinscheduler.common.utils.CollectionUtils; |
|
|
|
import org.apache.dolphinscheduler.common.utils.CollectionUtils; |
|
|
|
import org.apache.dolphinscheduler.common.utils.JSONUtils; |
|
|
|
import org.apache.dolphinscheduler.common.utils.JSONUtils; |
|
|
|
import org.apache.dolphinscheduler.common.utils.StringUtils; |
|
|
|
import org.apache.dolphinscheduler.common.utils.StringUtils; |
|
|
@ -275,7 +276,19 @@ public class DagHelper { |
|
|
|
} |
|
|
|
} |
|
|
|
Collection<String> startVertexs = null; |
|
|
|
Collection<String> startVertexs = null; |
|
|
|
if (StringUtils.isNotEmpty(parentNodeName)) { |
|
|
|
if (StringUtils.isNotEmpty(parentNodeName)) { |
|
|
|
|
|
|
|
TaskNode task = dag.getNode(parentNodeName); |
|
|
|
|
|
|
|
if (task.isConditionsTask() && completeTaskList.containsKey(parentNodeName)) { |
|
|
|
|
|
|
|
ConditionsParameters conditionsParameters = JSONUtils.parseObject(task.getConditionResult(), ConditionsParameters.class); |
|
|
|
|
|
|
|
TaskInstance taskInstance = completeTaskList.get(parentNodeName); |
|
|
|
|
|
|
|
if (taskInstance.getState().typeIsSuccess()) { |
|
|
|
|
|
|
|
startVertexs = conditionsParameters.getSuccessNode(); |
|
|
|
|
|
|
|
} else if (taskInstance.getState().typeIsFailure()) { |
|
|
|
|
|
|
|
startVertexs = conditionsParameters.getFailedNode(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else { |
|
|
|
startVertexs = dag.getSubsequentNodes(parentNodeName); |
|
|
|
startVertexs = dag.getSubsequentNodes(parentNodeName); |
|
|
|
|
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
startVertexs = dag.getBeginNode(); |
|
|
|
startVertexs = dag.getBeginNode(); |
|
|
|
} |
|
|
|
} |
|
|
|