Search in sources :

Example 1 with ElExpression

use of org.camunda.bpm.dmn.engine.impl.spi.el.ElExpression in project camunda-engine-dmn by camunda.

the class ExpressionEvaluationHandler method evaluateElExpression.

protected Object evaluateElExpression(String expressionLanguage, String expressionText, VariableContext variableContext, CachedExpressionSupport cachedExpressionSupport) {
    try {
        ElExpression elExpression = cachedExpressionSupport.getCachedExpression();
        if (elExpression == null) {
            synchronized (cachedExpressionSupport) {
                elExpression = cachedExpressionSupport.getCachedExpression();
                if (elExpression == null) {
                    elExpression = elProvider.createExpression(expressionText);
                    cachedExpressionSupport.setCachedExpression(elExpression);
                }
            }
        }
        return elExpression.getValue(variableContext);
    }// yes, we catch all exceptions
     catch (Exception e) {
        throw LOG.unableToEvaluateExpression(expressionText, expressionLanguage, e);
    }
}
Also used : ElExpression(org.camunda.bpm.dmn.engine.impl.spi.el.ElExpression) ScriptException(javax.script.ScriptException)

Aggregations

ScriptException (javax.script.ScriptException)1 ElExpression (org.camunda.bpm.dmn.engine.impl.spi.el.ElExpression)1