All Downloads are FREE. Search and download functionalities are using the official Maven repository.

templates.evaluatorFooter.mustache Maven / Gradle / Ivy

There is a newer version: 4.6.2
Show newest version

        // Evaluate properties that needs EL, validate evaluatedConf and returns it
        return Maybe
            .concat(Flowable.fromIterable(toEval))
            .ignoreElements()
            .andThen(Completable.fromRunnable(() -> validateConfiguration(evaluatedConfiguration)))
            .andThen(Completable.fromRunnable(() -> {
                if(baseExecutionContext != null) {
                    baseExecutionContext.setInternalAttribute("{{evaluatedConfigurationName}}-"+this.internalId, evaluatedConfiguration);
                }
            }))
            .onErrorResumeNext(t -> {
                if(baseExecutionContext != null) {
                    return ((HttpPlainExecutionContext)baseExecutionContext).interruptWith(new ExecutionFailure(500).message("Invalid configuration").key(FAILURE_CONFIGURATION_INVALID));
                }
                return Completable.error(t);
            })
            .toSingle(() -> evaluatedConfiguration);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy