Search in sources :

Example 1 with MethodNotFoundException

use of org.camunda.bpm.engine.impl.javax.el.MethodNotFoundException in project camunda-bpm-platform by camunda.

the class JuelExpression method getValue.

public Object getValue(VariableScope variableScope, BaseDelegateExecution contextExecution) {
    ELContext elContext = expressionManager.getElContext(variableScope);
    try {
        ExpressionGetInvocation invocation = new ExpressionGetInvocation(valueExpression, elContext, contextExecution);
        Context.getProcessEngineConfiguration().getDelegateInterceptor().handleInvocation(invocation);
        return invocation.getInvocationResult();
    } catch (PropertyNotFoundException pnfe) {
        throw new ProcessEngineException("Unknown property used in expression: " + expressionText + ". Cause: " + pnfe.getMessage(), pnfe);
    } catch (MethodNotFoundException mnfe) {
        throw new ProcessEngineException("Unknown method used in expression: " + expressionText + ". Cause: " + mnfe.getMessage(), mnfe);
    } catch (ELException ele) {
        throw new ProcessEngineException("Error while evaluating expression: " + expressionText + ". Cause: " + ele.getMessage(), ele);
    } catch (Exception e) {
        throw new ProcessEngineException("Error while evaluating expression: " + expressionText + ". Cause: " + e.getMessage(), e);
    }
}
Also used : ELContext(org.camunda.bpm.engine.impl.javax.el.ELContext) PropertyNotFoundException(org.camunda.bpm.engine.impl.javax.el.PropertyNotFoundException) ELException(org.camunda.bpm.engine.impl.javax.el.ELException) MethodNotFoundException(org.camunda.bpm.engine.impl.javax.el.MethodNotFoundException) ExpressionGetInvocation(org.camunda.bpm.engine.impl.delegate.ExpressionGetInvocation) ProcessEngineException(org.camunda.bpm.engine.ProcessEngineException) ProcessEngineException(org.camunda.bpm.engine.ProcessEngineException) MethodNotFoundException(org.camunda.bpm.engine.impl.javax.el.MethodNotFoundException) PropertyNotFoundException(org.camunda.bpm.engine.impl.javax.el.PropertyNotFoundException) ELException(org.camunda.bpm.engine.impl.javax.el.ELException)

Aggregations

ProcessEngineException (org.camunda.bpm.engine.ProcessEngineException)1 ExpressionGetInvocation (org.camunda.bpm.engine.impl.delegate.ExpressionGetInvocation)1 ELContext (org.camunda.bpm.engine.impl.javax.el.ELContext)1 ELException (org.camunda.bpm.engine.impl.javax.el.ELException)1 MethodNotFoundException (org.camunda.bpm.engine.impl.javax.el.MethodNotFoundException)1 PropertyNotFoundException (org.camunda.bpm.engine.impl.javax.el.PropertyNotFoundException)1