@Override public List<Row> execute(List<Row> rows, ExecutorContext context) throws DirectiveExecutionException, ErrorRowException { for (Row row : rows) { // Move the fields from the row into the context. ELContext ctx = new ELContext(); ctx.set("this", row); for(String var : el.variables()) { ctx.set(var, row.getValue(var)); } // Transient variables are added. if (context != null) { for (String variable : context.getTransientStore().getVariables()) { ctx.set(variable, context.getTransientStore().get(variable)); } } // Execution of the script / expression based on the row data // mapped into context. try { ELResult result = el.execute(ctx); if (result.getBoolean()) { context.getTransientStore().increment(variable, incrementBy); } } catch (ELException e) { throw new DirectiveExecutionException(e.getMessage()); } } return rows; }