Browse Source

script variable has "processDefinitionId" is error #2664 (#2666)

Co-authored-by: qiaozhanwei <qiaozhanwei@analysys.com.cn>
pull/3/MERGE
qiaozhanwei 5 years ago committed by GitHub
parent
commit
7c274400c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java

4
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java

@ -330,11 +330,13 @@ public class ProcessService {
for (TaskNode taskNode : taskNodeList){ for (TaskNode taskNode : taskNodeList){
String parameter = taskNode.getParams(); 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); SubProcessParameters subProcessParam = JSON.parseObject(parameter, SubProcessParameters.class);
ids.add(subProcessParam.getProcessDefinitionId()); ids.add(subProcessParam.getProcessDefinitionId());
recurseFindSubProcessId(subProcessParam.getProcessDefinitionId(),ids); recurseFindSubProcessId(subProcessParam.getProcessDefinitionId(),ids);
} }
} }
} }
} }

Loading…
Cancel
Save