01: package org.obe.runtime.evaluator;
02:
03: import org.obe.spi.evaluator.Evaluator;
04: import org.obe.spi.evaluator.EvaluatorException;
05: import org.obe.spi.WorkflowContext;
06:
07: /**
08: * @author Adrian Price
09: */
10: public abstract class AbstractEvaluator implements Evaluator {
11: public boolean evaluateCondition(String expr, WorkflowContext ctx)
12: throws EvaluatorException {
13:
14: boolean ret;
15: if (expr != null && expr.length() > 0) {
16: Object result = evaluateExpression(expr, ctx);
17: ret = Boolean.TRUE.equals(result);
18: } else {
19: // If there's no condition, the result is true.
20: ret = true;
21: }
22: return ret;
23: }
24: }
|