This is an automated email from the ASF dual-hosted git repository.

kirs pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-dolphinscheduler.git


The following commit(s) were added to refs/heads/dev by this push:
     new 5c898e3  [FIX-#5233][API] Fix bug ofREPEAT RUNNING processInstance 
throw exceprion (#5234)
5c898e3 is described below

commit 5c898e38ed62b0f8d034d1e910be4b45692dae8e
Author: wangxj3 <[email protected]>
AuthorDate: Thu Apr 8 18:58:43 2021 +0800

    [FIX-#5233][API] Fix bug ofREPEAT RUNNING processInstance throw exceprion 
(#5234)
    
    
    * fix bug of REPEAT RUNNING throw exception
    
    Co-authored-by: wangxj <wangxj31>
---
 .../dolphinscheduler/api/service/impl/ExecutorServiceImpl.java    | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git 
a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
 
b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
index 8e75eb9..9747127 100644
--- 
a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
+++ 
b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
@@ -24,7 +24,6 @@ import static 
org.apache.dolphinscheduler.common.Constants.CMD_PARAM_START_NODE_
 import static 
org.apache.dolphinscheduler.common.Constants.CMD_PARAM_START_PARAMS;
 import static org.apache.dolphinscheduler.common.Constants.MAX_TASK_TIMEOUT;
 
-import org.apache.commons.collections.MapUtils;
 import org.apache.dolphinscheduler.api.enums.ExecuteType;
 import org.apache.dolphinscheduler.api.enums.Status;
 import org.apache.dolphinscheduler.api.service.ExecutorService;
@@ -57,6 +56,8 @@ import org.apache.dolphinscheduler.dao.mapper.ProjectMapper;
 import org.apache.dolphinscheduler.service.process.ProcessService;
 import org.apache.dolphinscheduler.service.quartz.cron.CronUtils;
 
+import org.apache.commons.collections.MapUtils;
+
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.HashMap;
@@ -266,7 +267,10 @@ public class ExecutorServiceImpl extends BaseServiceImpl 
implements ExecutorServ
         Map<String, Object> commandMap = 
JSONUtils.toMap(processInstance.getCommandParam(), String.class, Object.class);
         String startParams = null;
         if (MapUtils.isNotEmpty(commandMap) && executeType == 
ExecuteType.REPEAT_RUNNING) {
-            startParams = 
(commandMap.get(Constants.CMD_PARAM_START_PARAMS)).toString();
+            Object startParamsJson = 
commandMap.get(Constants.CMD_PARAM_START_PARAMS);
+            if (startParamsJson != null) {
+                startParams = startParamsJson.toString();
+            }
         }
 
         switch (executeType) {

Reply via email to