JinyLeeChina commented on a change in pull request #6315:
URL: https://github.com/apache/dolphinscheduler/pull/6315#discussion_r714797354



##########
File path: 
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
##########
@@ -648,9 +648,14 @@ public Result queryProcessDefinitionListPaging(User 
loginUser, long projectCode,
             }
         }
 
-        int delete = 
processDefinitionMapper.deleteById(processDefinition.getId());
+        int deleteProcessDefinition = 
processDefinitionMapper.deleteById(processDefinition.getId());
+        List<ProcessTaskRelation> processTaskRelations = 
processTaskRelationMapper.queryByProcessCode(project.getCode(), 
processDefinition.getCode());
+        int deleteRelatedTask = 1;
+        for (ProcessTaskRelation processTaskRelation : processTaskRelations) {
+            deleteRelatedTask &= 
taskDefinitionMapper.deleteByCode(processTaskRelation.getPostTaskCode());

Review comment:
       Thanks for your contribution. It can't be modified here. The initial 
design is that tasks are organized through workflows. Tasks and workflows are 
parallel. Subsequent workflows will support task references and have an 
interface to operate tasks separately




-- 
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