protected List<RestVariable> processVariables(Execution execution, String scope, int variableType, String serverRootUrl) {
List<RestVariable> result = new ArrayList<RestVariable>();
Map<String, RestVariable> variableMap = new HashMap<String, RestVariable>();
// Check if it's a valid execution to get the variables for
RestVariableScope variableScope = RestVariable.getScopeFromString(scope);
if (variableScope == null) {
// Use both local and global variables
addLocalVariables(execution, variableType, variableMap, serverRootUrl);
addGlobalVariables(execution, variableType, variableMap, serverRootUrl);