zhuangchong commented on a change in pull request #3582:
URL: 
https://github.com/apache/incubator-dolphinscheduler/pull/3582#discussion_r478234613



##########
File path: 
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
##########
@@ -488,6 +488,12 @@ private String getResourceIds(ProcessData processData) {
             putMsg(result, Status.PROCESS_DEFINE_STATE_ONLINE, 
processDefinitionId);
             return result;
         }
+        // check process instances is already running
+        List<ProcessInstance> processInstances =  
processInstanceMapper.queryByProcessDefineIdAndStatus(processDefinitionId, 
Constants.NOT_TERMINATED_STATES);
+        if (CollectionUtils.isNotEmpty(processInstances)) {
+            putMsg(result, 
Status.DELETE_PROCESS_DEFINITION_BY_ID_FAIL,processInstances.size());
+            return result;
+        }

Review comment:
       Processinstanceservice has been used. Processinstanceservice should 
implement the interface. There are contributors who have submitted branches. I 
have not changed this.
   
   ---
   
   已使用processInstanceService ,processInstanceService 应该实现接口,已经有贡献者提交分支,这块我没有改.




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

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


Reply via email to