ExecutableScript executableScript = scriptService.executable(definition.getScriptType(), definition.getScript(),
ScriptService.ScriptType.INLINE, ImmutableMap.of("logger", logger));
executableScript.setNextVar("ctx", ctx);
executableScript.run();
// we need to unwrap the context object...
ctx = (Map<String, Object>) executableScript.unwrap(ctx);
} catch (Exception e) {
logger.warn("failed to script process {}, ignoring", e, ctx);
MongoDBRiverHelper.setRiverStatus(esClient, definition.getRiverName(), Status.SCRIPT_IMPORT_FAILED);
}
if (logger.isTraceEnabled()) {