org.kuali.rice.krms.framework.engine
Class BasicRule
java.lang.Object
   org.kuali.rice.krms.framework.engine.BasicRule
org.kuali.rice.krms.framework.engine.BasicRule
- All Implemented Interfaces: 
- Rule
- Direct Known Subclasses: 
- FalseTriggeredRule, ValidationRule
- public class BasicRule 
- extends Object- implements Rule
A Rule that executes a Action when the Proposition is true.
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
 
 
 
BasicRule
public BasicRule(String name,
                 Proposition proposition,
                 List<Action> actions)
- Parameters:
- name- Rule name
- proposition- cannot be null
- actions- Rule Actions
- Throws:
- IllegalArgumentException- if the Proposition is null
BasicRule
public BasicRule(Proposition proposition,
                 List<Action> actions)
- Parameters:
- proposition- cannot be null
- actions- Rule Actions
- Throws:
- IllegalArgumentException- if the Proposition is null
evaluate
public boolean evaluate(ExecutionEnvironment environment)
- 
- Specified by:
- evaluatein interface- Rule
 
- 
- Parameters:
- environment- ExecutionEnvironment
- Returns:
- true if given ExecutionEnvironmentthe rule's conditions pass, false if they do not
 
shouldExecuteAction
protected boolean shouldExecuteAction(boolean ruleExecutionResult)
- overridden
 
- 
 
- 
- Parameters:
- ruleExecutionResult- the result of the engines evaluation method.
- Returns:
- should the action execute
 
getName
public String getName()
- 
 
- 
- Returns:
- name Rule name
 
toString
public String toString()
- 
- Overrides:
- toStringin class- Object
 
- 
 
Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.