return false;
if (expression.isNegate()) { return !expressionResult; } else { return expressionResult; }
    private boolean checkExpression(long entryId, FieldExpression expression) {        Object value = expression.getValue();        int operator = expression.getOperator();        int field = expression.getField();        int context = expression.getContext();        Long id = new Long(entryId);        if (context == FieldExpression.ENTRY) {            SimpleWorkflowEntry theEntry = (SimpleWorkflowEntry) entryCache.get(id);            if (field == FieldExpression.NAME) {                return this.compareText(theEntry.getWorkflowName(), (String) value, operator);            }            if (field == FieldExpression.STATE) {                return this.compareLong(DataUtil.getInt((Integer) value), theEntry.getState(), operator);            }            throw new InvalidParameterException("unknown field");        }        List steps;        if (context == FieldExpression.CURRENT_STEPS) {            steps = (List) currentStepsCache.get(id);        } else if (context == FieldExpression.HISTORY_STEPS) {            steps = (List) historyStepsCache.get(id);        } else {            throw new InvalidParameterException("unknown field context");        }        if (steps == null) {            return false;        }        switch (field) {        case FieldExpression.ACTION:            long actionId = DataUtil.getLong((Long) value);            for (Iterator iterator = steps.iterator(); iterator.hasNext();) {                SimpleStep step = (SimpleStep) iterator.next();                if (this.compareLong(step.getActionId(), actionId, operator)) {                    return true;                }            }            return false;        case FieldExpression.CALLER:            String caller = (String) value;            for (Iterator iterator = steps.iterator(); iterator.hasNext();) {                SimpleStep step = (SimpleStep) iterator.next();                if (this.compareText(step.getCaller(), caller, operator)) {                    return true;                }            }            return false;        case FieldExpression.FINISH_DATE:            Date finishDate = (Date) value;            for (Iterator iterator = steps.iterator(); iterator.hasNext();) {                SimpleStep step = (SimpleStep) iterator.next();                if (this.compareDate(step.getFinishDate(), finishDate, operator)) {                    return true;                }            }            return false;        case FieldExpression.OWNER:            String owner = (String) value;            for (Iterator iterator = steps.iterator(); iterator.hasNext();) {                SimpleStep step = (SimpleStep) iterator.next();                if (this.compareText(step.getOwner(), owner, operator)) {                    return true;                }            }            return false;        case FieldExpression.START_DATE:            Date startDate = (Date) value;            for (Iterator iterator = steps.iterator(); iterator.hasNext();) {                SimpleStep step = (SimpleStep) iterator.next();                if (this.compareDate(step.getStartDate(), startDate, operator)) {                    return true;                }            }            return false;        case FieldExpression.STEP:            int stepId = DataUtil.getInt((Integer) value);            for (Iterator iterator = steps.iterator(); iterator.hasNext();) {                SimpleStep step = (SimpleStep) iterator.next();                if (this.compareLong(step.getStepId(), stepId, operator)) {                    return true;                }            }            return false;        case FieldExpression.STATUS:            String status = (String) value;            for (Iterator iterator = steps.iterator(); iterator.hasNext();) {                SimpleStep step = (SimpleStep) iterator.next();                if (this.compareText(step.getStatus(), status, operator)) {                    return true;                }            }            return false;        }        return false;    }