|
@@ -46,7 +46,6 @@ import org.apache.dolphinscheduler.common.utils.SnowFlakeUtils;
|
|
|
import org.apache.dolphinscheduler.common.utils.SnowFlakeUtils.SnowFlakeException;
|
|
|
import org.apache.dolphinscheduler.common.utils.StringUtils;
|
|
|
import org.apache.dolphinscheduler.dao.entity.DagData;
|
|
|
-import org.apache.dolphinscheduler.dao.entity.ProcessData;
|
|
|
import org.apache.dolphinscheduler.dao.entity.ProcessDefinition;
|
|
|
import org.apache.dolphinscheduler.dao.entity.ProcessDefinitionLog;
|
|
|
import org.apache.dolphinscheduler.dao.entity.ProcessInstance;
|
|
@@ -287,9 +286,11 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
|
|
|
Set<Long> postTaskCodes = taskRelationList.stream().map(ProcessTaskRelationLog::getPostTaskCode).collect(Collectors.toSet());
|
|
|
Set<Long> taskNodeCodes = taskNodeList.stream().map(TaskNode::getCode).collect(Collectors.toSet());
|
|
|
Collection<Long> codes = CollectionUtils.subtract(postTaskCodes, taskNodeCodes);
|
|
|
- logger.error("the task code is not exit");
|
|
|
- putMsg(result, Status.TASK_DEFINE_NOT_EXIST, StringUtils.join(codes, Constants.COMMA));
|
|
|
- return result;
|
|
|
+ if (CollectionUtils.isNotEmpty(codes)) {
|
|
|
+ logger.error("the task code is not exit");
|
|
|
+ putMsg(result, Status.TASK_DEFINE_NOT_EXIST, StringUtils.join(codes, Constants.COMMA));
|
|
|
+ return result;
|
|
|
+ }
|
|
|
}
|
|
|
if (graphHasCycle(taskNodeList)) {
|
|
|
logger.error("process DAG has cycle");
|