|
|
@ -63,9 +63,10 @@ public class ParamUtils { |
|
|
|
// combining local and global parameters
|
|
|
|
// combining local and global parameters
|
|
|
|
Map<String, Property> localParams = parameters.getLocalParametersMap(); |
|
|
|
Map<String, Property> localParams = parameters.getLocalParametersMap(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//stream pass params
|
|
|
|
Map<String, Property> varParams = parameters.getVarPoolMap(); |
|
|
|
Map<String, Property> varParams = parameters.getVarPoolMap(); |
|
|
|
|
|
|
|
|
|
|
|
if (globalParams == null && localParams == null) { |
|
|
|
if (globalParams.size() == 0 && localParams.size() == 0 && varParams.size() == 0) { |
|
|
|
return null; |
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
|
// if it is a complement,
|
|
|
|
// if it is a complement,
|
|
|
@ -85,15 +86,13 @@ public class ParamUtils { |
|
|
|
} |
|
|
|
} |
|
|
|
params.put(PARAMETER_TASK_INSTANCE_ID, Integer.toString(taskExecutionContext.getTaskInstanceId())); |
|
|
|
params.put(PARAMETER_TASK_INSTANCE_ID, Integer.toString(taskExecutionContext.getTaskInstanceId())); |
|
|
|
|
|
|
|
|
|
|
|
if (globalParams != null && localParams != null) { |
|
|
|
if (varParams.size() != 0) { |
|
|
|
globalParams.putAll(localParams); |
|
|
|
globalParams.putAll(varParams); |
|
|
|
} else if (globalParams == null && localParams != null) { |
|
|
|
|
|
|
|
globalParams = localParams; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
if (varParams != null) { |
|
|
|
if (localParams.size() != 0) { |
|
|
|
varParams.putAll(globalParams); |
|
|
|
globalParams.putAll(localParams); |
|
|
|
globalParams = varParams; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Iterator<Map.Entry<String, Property>> iter = globalParams.entrySet().iterator(); |
|
|
|
Iterator<Map.Entry<String, Property>> iter = globalParams.entrySet().iterator(); |
|
|
|
while (iter.hasNext()) { |
|
|
|
while (iter.hasNext()) { |
|
|
|
Map.Entry<String, Property> en = iter.next(); |
|
|
|
Map.Entry<String, Property> en = iter.next(); |
|
|
@ -143,16 +142,15 @@ public class ParamUtils { |
|
|
|
* @return parameters map |
|
|
|
* @return parameters map |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static Map<String, Property> getUserDefParamsMap(Map<String, String> definedParams) { |
|
|
|
public static Map<String, Property> getUserDefParamsMap(Map<String, String> definedParams) { |
|
|
|
|
|
|
|
Map<String, Property> userDefParamsMaps = new HashMap<>(); |
|
|
|
if (definedParams != null) { |
|
|
|
if (definedParams != null) { |
|
|
|
Map<String, Property> userDefParamsMaps = new HashMap<>(); |
|
|
|
|
|
|
|
Iterator<Map.Entry<String, String>> iter = definedParams.entrySet().iterator(); |
|
|
|
Iterator<Map.Entry<String, String>> iter = definedParams.entrySet().iterator(); |
|
|
|
while (iter.hasNext()) { |
|
|
|
while (iter.hasNext()) { |
|
|
|
Map.Entry<String, String> en = iter.next(); |
|
|
|
Map.Entry<String, String> en = iter.next(); |
|
|
|
Property property = new Property(en.getKey(), Direct.IN, DataType.VARCHAR, en.getValue()); |
|
|
|
Property property = new Property(en.getKey(), Direct.IN, DataType.VARCHAR, en.getValue()); |
|
|
|
userDefParamsMaps.put(property.getProp(),property); |
|
|
|
userDefParamsMaps.put(property.getProp(),property); |
|
|
|
} |
|
|
|
} |
|
|
|
return userDefParamsMaps; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
return null; |
|
|
|
return userDefParamsMaps; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |