Map<String, Object> values = new HashMap<>();
values.put("a-b", "indoor");
EvaluationValue result = e.withValues(values).evaluate();
BaseException(startPosition=4, endPosition=5, tokenString=a, message=Variable or constant value for 'a' not found)
at Main.main(Main.java:24)
Caused by: BaseException(startPosition=4, endPosition=5, tokenString=a, message=Variable or constant value for 'a' not found)
dot (.) and hyphen (-) are reserved operators from the library. I would suggest you replace those special characters with underscore (_) when creating expressions and passing in variables.
"{airQuality.temperature} > 44"
Map<String, Object> values = new HashMap<>(); values.put("a-b", "indoor"); EvaluationValue result = e.withValues(values).evaluate();
BaseException(startPosition=4, endPosition=5, tokenString=a, message=Variable or constant value for 'a' not found) at Main.main(Main.java:24) Caused by: BaseException(startPosition=4, endPosition=5, tokenString=a, message=Variable or constant value for 'a' not found)
Any workaround for this ?