You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/09/15 14:00:04 UTC

[GitHub] [dolphinscheduler] ruanwenjun commented on a diff in pull request #11954: fix process instance display and npe when save

ruanwenjun commented on code in PR #11954:
URL: https://github.com/apache/dolphinscheduler/pull/11954#discussion_r972025219


##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessInstanceServiceImpl.java:
##########
@@ -533,6 +533,10 @@ public Map<String, Object> updateProcessInstance(User loginUser, long projectCod
         }
         ProcessDefinition processDefinition =
                 processDefineMapper.queryByCode(processInstance.getProcessDefinitionCode());
+        if (processDefinition == null) {
+            putMsg(result, Status.PROCESS_DEFINE_NOT_EXIST,processInstance.getProcessDefinitionCode());
+            return result;

Review Comment:
   ```suggestion
              throw new ServiceException(Status.PROCESS_DEFINE_NOT_EXIST,processInstance.getProcessDefinitionCode());
   ```



-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org