Search in sources :

Example 1 with MethodNotFoundException

use of org.activiti.engine.impl.javax.el.MethodNotFoundException in project Activiti by Activiti.

the class JuelExpression method getValue.

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

Aggregations

ActivitiException (org.activiti.engine.ActivitiException)1 ExpressionGetInvocation (org.activiti.engine.impl.delegate.ExpressionGetInvocation)1 ELContext (org.activiti.engine.impl.javax.el.ELContext)1 ELException (org.activiti.engine.impl.javax.el.ELException)1 MethodNotFoundException (org.activiti.engine.impl.javax.el.MethodNotFoundException)1 PropertyNotFoundException (org.activiti.engine.impl.javax.el.PropertyNotFoundException)1