org.kuali.rice.krms.framework.engine
Class BasicRule
java.lang.Object
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 nameproposition
- cannot be nullactions
- Rule Actions
- Throws:
IllegalArgumentException
- if the Proposition is null
BasicRule
public BasicRule(Proposition proposition,
List<Action> actions)
- Parameters:
proposition
- cannot be nullactions
- Rule Actions
- Throws:
IllegalArgumentException
- if the Proposition is null
evaluate
public boolean evaluate(ExecutionEnvironment environment)
- Description copied from interface:
Rule
- Evaluate a given
ExecutionEnvironment
, returning true if the rules conditions pass, false if they do not.
- Specified by:
evaluate
in interface Rule
- Parameters:
environment
- ExecutionEnvironment
- Returns:
- true if given
ExecutionEnvironment
the 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:
toString
in class Object
Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.