Interface Rule

    • Field Detail

      • DEFAULT_NAME

        static final java.lang.String DEFAULT_NAME
        Default rule name.
        See Also:
        Constant Field Values
      • DEFAULT_DESCRIPTION

        static final java.lang.String DEFAULT_DESCRIPTION
        Default rule description.
        See Also:
        Constant Field Values
      • DEFAULT_PRIORITY

        static final int DEFAULT_PRIORITY
        Default rule priority.
        See Also:
        Constant Field Values
    • Method Detail

      • evaluate

        boolean evaluate​(Facts facts)
        This method implements the rule's condition(s). Implementations should handle any runtime exception and return true/false accordingly
        Returns:
        true if the rule should be applied given the provided facts, false otherwise
      • execute

        void execute​(Facts facts)
              throws java.lang.Exception
        This method implements the rule's action(s).
        Throws:
        java.lang.Exception - thrown if an exception occurs when performing action(s)
      • getDescription

        default java.lang.String getDescription()
        Getter for rule description.
        Returns:
        rule description
      • getName

        default java.lang.String getName()
        Getter for rule name.
        Returns:
        the rule name
      • getPriority

        default int getPriority()
        Getter for rule priority.
        Returns:
        rule priority