Search in sources :

Example 1 with ExpressionGetInvocation

use of org.activiti.engine.impl.delegate.invocation.ExpressionGetInvocation in project Activiti by Activiti.

the class JuelExpression method getValueFromContext.

private Object getValueFromContext(ELContext elContext, DelegateInterceptor delegateInterceptor) {
    try {
        ExpressionGetInvocation invocation = new ExpressionGetInvocation(valueExpression, elContext);
        delegateInterceptor.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 (Exception ele) {
        throw new ActivitiException("Error while evaluating expression: " + expressionText, ele);
    }
}
Also used : ActivitiException(org.activiti.engine.ActivitiException) PropertyNotFoundException(javax.el.PropertyNotFoundException) MethodNotFoundException(javax.el.MethodNotFoundException) ExpressionGetInvocation(org.activiti.engine.impl.delegate.invocation.ExpressionGetInvocation) ActivitiException(org.activiti.engine.ActivitiException) PropertyNotFoundException(javax.el.PropertyNotFoundException) MethodNotFoundException(javax.el.MethodNotFoundException)

Aggregations

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