org.kuali.rice.kew.rule
Class MetaRuleExpression

java.lang.Object
  extended by org.kuali.rice.kew.rule.BSFRuleExpression
      extended by org.kuali.rice.kew.rule.AccumulatingBSFRuleExpression
          extended by org.kuali.rice.kew.rule.MetaRuleExpression
All Implemented Interfaces:
RuleExpression
Direct Known Subclasses:
KRAMetaRuleExpression

public class MetaRuleExpression
extends AccumulatingBSFRuleExpression

Expression implementation for "meta rules". A "meta rule" consists of a sequence of subordinate rule evaluations each processed according to an associated modifier:

next
proceed with rule evaluation
true
if this rule evaluates to true, then return the responsibilities associated with the rule
false
if this rule evaluates to false, then return the responsibilities associated with the rule
E.g.
bizRule1: next; bizRule2: true; bizRule3: false

Author:
Kuali Rice Team (rice.collab@kuali.org)

Nested Class Summary
 
Nested classes/interfaces inherited from class org.kuali.rice.kew.rule.BSFRuleExpression
BSFRuleExpression.WorkflowRuleAPI
 
Field Summary
private static org.apache.log4j.Logger LOG
           
 
Constructor Summary
MetaRuleExpression()
           
 
Method Summary
 RuleExpressionResult evaluate(Rule rule, RouteContext context)
          Performs an evaluation and returns a list of 0 or more RuleResponsibilitys to which to dispatch action requests
private  RuleExpressionResult evaluateBuiltinExpression(String expression, Rule rule, RouteContext context)
          Evaluates the builtin "meta" rule expression
 
Methods inherited from class org.kuali.rice.kew.rule.AccumulatingBSFRuleExpression
declareBeans
 
Methods inherited from class org.kuali.rice.kew.rule.BSFRuleExpression
parseLang
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

private static final org.apache.log4j.Logger LOG
Constructor Detail

MetaRuleExpression

public MetaRuleExpression()
Method Detail

evaluate

public RuleExpressionResult evaluate(Rule rule,
                                     RouteContext context)
                              throws WorkflowException
Description copied from interface: RuleExpression
Performs an evaluation and returns a list of 0 or more RuleResponsibilitys to which to dispatch action requests

Specified by:
evaluate in interface RuleExpression
Overrides:
evaluate in class BSFRuleExpression
Parameters:
rule - the rule that this rule expression applies to
context - the RouteContext under which the expression is being evaluated
Returns:
the result of the rule evaluation
Throws:
WorkflowException

evaluateBuiltinExpression

private RuleExpressionResult evaluateBuiltinExpression(String expression,
                                                       Rule rule,
                                                       RouteContext context)
                                                throws WorkflowException
Evaluates the builtin "meta" rule expression

Parameters:
expression - the builtin meta rule expression
rule - the rule
context - the route context
Returns:
RuleExpressionResult the result
Throws:
WorkflowException


Copyright © 2007-2011 The Kuali Foundation. All Rights Reserved.