...
First of all, for maintenance document rules, we need to extend org.kuali.ricekfs.kns.maintenance.rules.MaintenanceDocumentRuleBase, which is a class that implements org.kuali.ricekfs.kns.maintenance.rules.MaintenanceDocumentRule. This class has a lot of built in functionality: for instance, it automatically validates a maintenance document against the attributes in business object data dictionary files and enforces authorization rules. Rules classes that extend it also get useful utility methods for adding errors to the document and testing against parameterized rules. Indeed, the class has so much functionality that if we don't specify a rules class in the data dictionary for our maintenance document, it will simply use MaintenanceDocumentRuleBase.
...
Some maintenance documents (in KFS 2.0, typically global maintenance documents, though there are others as well) have collections associated with them. Just as the accounting document framework can validate an accounting line as soon as the line is added to the document, we want these collections to have the ability to validate collection lines as soon as they are added. Therefore, we have our fourth rule processing method:
...