zhuangchong commented on code in PR #15681:
URL: 
https://github.com/apache/dolphinscheduler/pull/15681#discussion_r1516005609


##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java:
##########
@@ -815,6 +815,13 @@ public Map<String, Object> updateProcessDefinition(User 
loginUser,
         return result;
     }
 
+    /**
+     * Check if there're any tasks that depend on the process
+     */
+    private void checkIfDependentTaskExists(ProcessDefinition 
processDefinition) {

Review Comment:
   no called.
   
   



##########
dolphinscheduler-ui/src/views/projects/workflow/components/dag/dag-context-menu.tsx:
##########
@@ -76,7 +81,19 @@ export default defineComponent({
   setup(props, ctx) {
     const graph = inject('graph', ref())
     const route = useRoute()
+    const router: Router = useRouter()
     const projectCode = Number(route.params.projectCode)
+    const workflowCode = Number(route.params.code)
+    const { t } = useI18n()
+
+    // const dependenciesData = reactive({
+    //       showRef: false,
+    //       taskLinks: ref([]),
+    //       required: ref(false),
+    //       tip: ref(''), action: () => {}
+    // })

Review Comment:
   Please delete this part.
   
   
   
   



##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/WorkFlowLineageController.java:
##########
@@ -135,4 +135,26 @@ public Result verifyTaskCanDelete(@Parameter(hidden = 
true) @RequestAttribute(va
         putMsg(result, Status.SUCCESS);
         return result;
     }
+
+    @Operation(summary = "queryDownstreamDependentTaskList", description = 
"QUERY_DOWNSTREAM_DEPENDENT_TASK_NOTES")
+    @Parameters({
+            @Parameter(name = "projectCode", description = "PROJECT_CODE", 
required = true, schema = @Schema(implementation = Long.class)),
+            @Parameter(name = "workFlowCode", description = 
"PROCESS_DEFINITION_CODE", required = true, schema = @Schema(implementation = 
Long.class)),
+            @Parameter(name = "taskCode", description = 
"TASK_DEFINITION_CODE", required = false, schema = @Schema(implementation = 
Long.class, example = "123456789")),
+    })
+    @GetMapping(value = "/query-dependent-tasks")
+    @ResponseStatus(HttpStatus.OK)
+    public Result<Map<String, Object>> 
queryDownstreamDependentTaskList(@Parameter(hidden = true) 
@RequestAttribute(value = SESSION_USER) User loginUser,
+                                                                        
@Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) 
@PathVariable Long projectCode,
+                                                                        
@RequestParam(value = "workFlowCode") Long workFlowCode,
+                                                                        
@RequestParam(value = "taskCode", required = false, defaultValue = "0") Long 
taskCode) {
+        try {
+            Map<String, Object> result =
+                    
workFlowLineageService.queryDownstreamDependentTasks(projectCode, workFlowCode, 
taskCode);
+            return returnDataList(result);
+        } catch (Exception e) {
+            log.error(QUERY_WORKFLOW_LINEAGE_ERROR.getMsg(), e);
+            return error(QUERY_WORKFLOW_LINEAGE_ERROR.getCode(), 
QUERY_WORKFLOW_LINEAGE_ERROR.getMsg());
+        }

Review Comment:
    I recommend using `@ApiException` annotation for this part of the code.
   
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to