Hi, everyone!
I just test dmn-evaluation with non-exist variable, see below:
If i don’t put ‘season’ variable to my Variable-Context, and then dmn-engin will thrown a error as like this: FEEL/SCALA-01008 Error while evaluating expression: failed to evaluate expression ‘season’: no variable found for name ‘season’. I use test code as:
@Test
public void shouldServeDryAgedInSpringForFewGuests() {
VariableMap variables = Variables
// .putValue("season", "Spring")
.putValue("guestCount", 5);
DmnDecisionTableResult result = dmnEngine.evaluateDecisionTable(decision, variables);
assertEquals("Dry Aged Gourmet Steak", result.getSingleResult().getSingleEntry());
}
Some times the context-variables is missing key, this is normal behavior in my situation. Example i have a service-task to fetch some metrics and then set context, but when error occur, the all metrics must be null, i hope the process will go on, and how to promise that?