コード例 #1
0
        public virtual object getValue(VariableScope variableScope, BaseDelegateExecution contextExecution)
        {
            ELContext elContext = expressionManager.getElContext(variableScope);

            try
            {
                ExpressionGetInvocation invocation = new ExpressionGetInvocation(valueExpression, elContext, contextExecution);
                Context.ProcessEngineConfiguration.DelegateInterceptor.handleInvocation(invocation);
                return(invocation.InvocationResult);
            }
            catch (PropertyNotFoundException pnfe)
            {
                throw new ProcessEngineException("Unknown property used in expression: " + expressionText + ". Cause: " + pnfe.Message, pnfe);
            }
            catch (MethodNotFoundException mnfe)
            {
                throw new ProcessEngineException("Unknown method used in expression: " + expressionText + ". Cause: " + mnfe.Message, mnfe);
            }
            catch (ELException ele)
            {
                throw new ProcessEngineException("Error while evaluating expression: " + expressionText + ". Cause: " + ele.Message, ele);
            }
            catch (Exception e)
            {
                throw new ProcessEngineException("Error while evaluating expression: " + expressionText + ". Cause: " + e.Message, e);
            }
        }
コード例 #2
0
        public virtual void setValue(object value, VariableScope variableScope, BaseDelegateExecution contextExecution)
        {
            ELContext elContext = expressionManager.getElContext(variableScope);

            try
            {
                ExpressionSetInvocation invocation = new ExpressionSetInvocation(valueExpression, elContext, value, contextExecution);
                Context.ProcessEngineConfiguration.DelegateInterceptor.handleInvocation(invocation);
            }
            catch (Exception e)
            {
                throw new ProcessEngineException("Error while evaluating expression: " + expressionText + ". Cause: " + e.Message, e);
            }
        }