This is an automated email from the ASF dual-hosted git repository.
kerwin pushed a commit to branch 3.1.1-prepare
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
The following commit(s) were added to refs/heads/3.1.1-prepare by this push:
new 771dd67b2e cherry-pick [Improvement-12391][API] Workflow definitions
that contain logical task nodes support the copy function
771dd67b2e is described below
commit 771dd67b2e6ed030742021bc10c2307ab2a5cf8c
Author: Kerwin <[email protected]>
AuthorDate: Mon Oct 17 10:28:58 2022 +0800
cherry-pick [Improvement-12391][API] Workflow definitions that contain
logical task nodes support the copy function
---
.../main/java/org/apache/dolphinscheduler/api/enums/Status.java | 1 -
.../api/service/impl/ProcessDefinitionServiceImpl.java | 8 --------
.../apache/dolphinscheduler/plugin/task/api/TaskConstants.java | 3 ---
3 files changed, 12 deletions(-)
diff --git
a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
index a34ca157d9..1dc7e61c3f 100644
---
a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
+++
b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
@@ -309,7 +309,6 @@ public enum Status {
PROJECT_PROCESS_NOT_MATCH(50054, "the project and the process is not
match", "项目和工作流不匹配"),
DELETE_EDGE_ERROR(50055, "delete edge error", "删除工作流任务连接线错误"),
NOT_SUPPORT_UPDATE_TASK_DEFINITION(50056, "task state does not support
modification", "当前任务不支持修改"),
- NOT_SUPPORT_COPY_TASK_TYPE(50057, "task type [{0}] does not support copy",
"不支持复制的任务类型[{0}]"),
BATCH_EXECUTE_PROCESS_INSTANCE_ERROR(50058, "change process instance
status error: {0}", "修改工作实例状态错误: {0}"),
START_TASK_INSTANCE_ERROR(50059, "start task instance error", "运行任务流实例错误"),
diff --git
a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
index 7123472914..b6dff7f51b 100644
---
a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
+++
b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
@@ -36,7 +36,6 @@ import static
org.apache.dolphinscheduler.common.Constants.COPY_SUFFIX;
import static
org.apache.dolphinscheduler.common.Constants.DEFAULT_WORKER_GROUP;
import static org.apache.dolphinscheduler.common.Constants.EMPTY_STRING;
import static org.apache.dolphinscheduler.common.Constants.IMPORT_SUFFIX;
-import static
org.apache.dolphinscheduler.plugin.task.api.TaskConstants.COMPLEX_TASK_TYPES;
import static
org.apache.dolphinscheduler.plugin.task.api.TaskConstants.TASK_TYPE_SQL;
import org.apache.dolphinscheduler.api.dto.DagDataSchedule;
@@ -1862,9 +1861,6 @@ public class ProcessDefinitionServiceImpl extends
BaseServiceImpl implements Pro
}
List<String> failedProcessList = new ArrayList<>();
doBatchOperateProcessDefinition(loginUser, targetProjectCode,
failedProcessList, codes, result, true);
- if (result.get(Constants.STATUS) == Status.NOT_SUPPORT_COPY_TASK_TYPE)
{
- return result;
- }
checkBatchOperateResult(projectCode, targetProjectCode, result,
failedProcessList, true);
return result;
}
@@ -1953,10 +1949,6 @@ public class ProcessDefinitionServiceImpl extends
BaseServiceImpl implements Pro
List<TaskDefinitionLog> taskDefinitionLogs =
processService.genTaskDefineList(processTaskRelations);
Map<Long, Long> taskCodeMap = new HashMap<>();
for (TaskDefinitionLog taskDefinitionLog : taskDefinitionLogs)
{
- if
(COMPLEX_TASK_TYPES.contains(taskDefinitionLog.getTaskType())) {
- putMsg(result, Status.NOT_SUPPORT_COPY_TASK_TYPE,
taskDefinitionLog.getTaskType());
- return;
- }
try {
long taskCode =
CodeGenerateUtils.getInstance().genCode();
taskCodeMap.put(taskDefinitionLog.getCode(), taskCode);
diff --git
a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/TaskConstants.java
b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/TaskConstants.java
index 2a4b1de40d..905accc3f4 100644
---
a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/TaskConstants.java
+++
b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/TaskConstants.java
@@ -400,9 +400,6 @@ public class TaskConstants {
public static final String TASK_TYPE_STREAM = "STREAM";
- public static final List<String> COMPLEX_TASK_TYPES = Arrays
- .asList(new String[]{TASK_TYPE_CONDITIONS, TASK_TYPE_SWITCH,
TASK_TYPE_SUB_PROCESS, TASK_TYPE_DEPENDENT});
-
/**
* aws config
*/