Map<String, StateVariableValue> mapToProcess = new HashMap<String, StateVariableValue>();
if(result != null) {
// only process the variables that have changed value
for(String variable : result.keySet()) {
ActionArgumentValue newArgument = result.get(variable);
StateVariable newVariable = new StateVariable(variable,new StateVariableTypeDetails(newArgument.getDatatype()));
StateVariableValue newValue = new StateVariableValue(newVariable, newArgument.getValue());
if(isUpdatedValue(variable,newValue)) {
mapToProcess.put(variable, newValue);
}
}