Class BasicRule

java.lang.Object
org.kuali.rice.krms.framework.engine.BasicRule
All Implemented Interfaces:
Rule
Direct Known Subclasses:
FalseTriggeredRule

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)
  • Constructor Details

  • Method Details

    • evaluate

      public boolean evaluate(org.kuali.rice.krms.api.engine.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)
      Based on the ruleExecutionResult should the Action be executed? Default behavior is to return the given ruleExecutionResult. Over-writable by subclasses.
      Parameters:
      ruleExecutionResult - the result of the engines evaluation method.
      Returns:
      boolean should the action execute
    • getName

      public String getName()
      Return the Rule name
      Returns:
      name Rule name
    • toString

      public String toString()
      Overrides:
      toString in class Object