|
|
@ -27,6 +27,8 @@ import static org.apache.dolphinscheduler.common.Constants.CMD_PARAM_SUB_PROCESS |
|
|
|
import static org.apache.dolphinscheduler.common.Constants.CMD_PARAM_SUB_PROCESS_DEFINE_CODE; |
|
|
|
import static org.apache.dolphinscheduler.common.Constants.CMD_PARAM_SUB_PROCESS_DEFINE_CODE; |
|
|
|
import static org.apache.dolphinscheduler.common.Constants.CMD_PARAM_SUB_PROCESS_PARENT_INSTANCE_ID; |
|
|
|
import static org.apache.dolphinscheduler.common.Constants.CMD_PARAM_SUB_PROCESS_PARENT_INSTANCE_ID; |
|
|
|
import static org.apache.dolphinscheduler.common.Constants.LOCAL_PARAMS; |
|
|
|
import static org.apache.dolphinscheduler.common.Constants.LOCAL_PARAMS; |
|
|
|
|
|
|
|
import static org.apache.dolphinscheduler.plugin.task.api.enums.DataType.VARCHAR; |
|
|
|
|
|
|
|
import static org.apache.dolphinscheduler.plugin.task.api.enums.Direct.IN; |
|
|
|
import static org.apache.dolphinscheduler.plugin.task.api.utils.DataQualityConstants.TASK_INSTANCE_ID; |
|
|
|
import static org.apache.dolphinscheduler.plugin.task.api.utils.DataQualityConstants.TASK_INSTANCE_ID; |
|
|
|
|
|
|
|
|
|
|
|
import org.apache.dolphinscheduler.common.Constants; |
|
|
|
import org.apache.dolphinscheduler.common.Constants; |
|
|
@ -814,14 +816,22 @@ public class ProcessServiceImpl implements ProcessService { |
|
|
|
} |
|
|
|
} |
|
|
|
startParamMap.putAll(fatherParamMap); |
|
|
|
startParamMap.putAll(fatherParamMap); |
|
|
|
// set start param into global params
|
|
|
|
// set start param into global params
|
|
|
|
|
|
|
|
Map<String, String> globalMap = processDefinition.getGlobalParamMap(); |
|
|
|
|
|
|
|
List<Property> globalParamList = processDefinition.getGlobalParamList(); |
|
|
|
if (startParamMap.size() > 0 |
|
|
|
if (startParamMap.size() > 0 |
|
|
|
&& processDefinition.getGlobalParamMap() != null) { |
|
|
|
&& globalMap != null) { |
|
|
|
for (Map.Entry<String, String> param : processDefinition.getGlobalParamMap().entrySet()) { |
|
|
|
for (Map.Entry<String, String> param : globalMap.entrySet()) { |
|
|
|
String val = startParamMap.get(param.getKey()); |
|
|
|
String val = startParamMap.get(param.getKey()); |
|
|
|
if (val != null) { |
|
|
|
if (val != null) { |
|
|
|
param.setValue(val); |
|
|
|
param.setValue(val); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
for (Entry<String, String> startParam : startParamMap.entrySet()) { |
|
|
|
|
|
|
|
if (!globalMap.containsKey(startParam.getKey())) { |
|
|
|
|
|
|
|
globalMap.put(startParam.getKey(), startParam.getValue()); |
|
|
|
|
|
|
|
globalParamList.add(new Property(startParam.getKey(), IN, VARCHAR, startParam.getValue())); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|