class WidMVELEvaluator {

    public static Object eval(final String expression) {
        ExpressionCompiler compiler = new ExpressionCompiler(getRevisedExpression(expression),
                                                             WID_PARSER_CONTEXT);

        if(KiePolicyHelper.isPolicyEnabled()) {
            return AccessController.doPrivileged(new PrivilegedAction<Object>() {
                @Override
                public Object run() {
                    return MVEL.executeExpression(compiler.compile(),
                                                  new HashMap());
                }
            }, KiePolicyHelper.getAccessContext());
        } else {
            return MVEL.executeExpression(compiler.compile(),
                                          new HashMap());
        }
    }

}