You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by jo...@apache.org on 2020/05/09 10:08:39 UTC

[incubator-dolphinscheduler] branch dev-1.3.0 updated: script variable has "processDefinitionId" is error #2664 (#2666)

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

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


The following commit(s) were added to refs/heads/dev-1.3.0 by this push:
     new 7c27440  script variable has "processDefinitionId" is error #2664 (#2666)
7c27440 is described below

commit 7c274400c0441f2983e0a35839569863a8b4b5da
Author: qiaozhanwei <qi...@outlook.com>
AuthorDate: Sat May 9 18:08:23 2020 +0800

    script variable has "processDefinitionId" is error #2664 (#2666)
    
    Co-authored-by: qiaozhanwei <qi...@analysys.com.cn>
---
 .../org/apache/dolphinscheduler/service/process/ProcessService.java   | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java b/dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
index 4033b26..e0ebaf4 100644
--- a/dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
+++ b/dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
@@ -330,11 +330,13 @@ public class ProcessService {
 
             for (TaskNode taskNode : taskNodeList){
                 String parameter = taskNode.getParams();
-                if (parameter.contains(CMDPARAM_SUB_PROCESS_DEFINE_ID)){
+                JSONObject parameterJson = JSONObject.parseObject(parameter);
+                if (parameterJson.getInteger(CMDPARAM_SUB_PROCESS_DEFINE_ID) != null){
                     SubProcessParameters subProcessParam = JSON.parseObject(parameter, SubProcessParameters.class);
                     ids.add(subProcessParam.getProcessDefinitionId());
                     recurseFindSubProcessId(subProcessParam.getProcessDefinitionId(),ids);
                 }
+
             }
         }
     }