close

Filter

loading table of contents...

Workflow Manual / Version 2110

Table Of Contents

5.4.3 Boolean Expressions

Interface to implement

For a Boolean expression you need to implement the interface WfBooleanExpression. It extends WfExpression and defines an evaluateExpression() method with a Boolean result.

Convenience classes

For convenience you can subclass from com.coremedia.workflow.common.expressions.AbstractBooleanExpression and implement its evaluateExpression() method.

The abstract classes evaluate() method calls evaluateExpression() and builds a BooleanValue from the returned value. The next example shows a simple Boolean expression which always returns true - a tautology.

public class Tautology extends AbstractBooleanExpression {

  public String getName() {return "Tautology";}

  public boolean evaluateExpression(WfInstance instance, 
                                    Map localVariables) {
    return true;
  }
}

Example 5.8. Example of a Boolean expression


Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.