Kuali Rice Development
  1. Kuali Rice Development
  2. KULRICE-8378

KNS-based maintenance documents are not using KNS Business Rules classes

    Details

    • Type: Bug Fix Bug Fix
    • Status: Closed Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.1.2
    • Fix Version/s: 2.1.2
    • Component/s: Development
    • Security Level: Public (Public: Anyone can view)
    • Labels:
      None
    • Similar issues:
      KULRICE-2622Implement business rules for the new Routing Rule maintenance document
      KULRICE-4674integrate with KNS business rules
      KULRICE-2653Implement business rules for the new Routing Rule Delegation maintenance document
      KULRICE-10655Maintenance Business Rules missing processAddCollectionLineBusinessRules implementation
      KULRICE-10657Create Web Tests for KRAD Maintenance Document Business Rules
      KULRICE-9287KualiLookupableTest fails in CI with Lookup not defined for business object class org.kuali.rice.krad.test.document.bo.Account
      KULRICE-2238Convert KEW Rule and Delegate rule documents to use the KNS
      KULRICE-9552Deprecate old business object classes and document replacements (if any)
      KULRICE-10115Maintenance Gap Analysis: Business Rules (rows 74 - 79)
      KULRICE-6124Lookup framework needs preliminary documentation page on using custom Lookupable Helper classes for business objects
    • Rice Module:
      Rice Core, KNS, KIM
    • Application Requirement:
      KFS
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required

      Description

      There is no enforcement in the KNS versions of the data dictionary document entries that the business rules (and probably document authorizers and presentation controllers.)

      This causes a couple of problems:

      1) Rice maintenance documents are reporting their errors at the bottom of the page and not identifying the fields since the error paths (created by the KRAD business rules base class) are adding .dataObject into the field path names.

      2) Implementing applications which do not need custom business rules and leave the property on the document entry null are getting the KRAD version at runtime, resulting in the same errors.

      Parameter maintenance document is an example. Simply create a new parameter document and click submit. Errors appear at the bottom of the page and no fields are highlighted.

      I am making the following change to prevent these problems in KFS code (at UCD), but this should really be in the KNS version of the maintenance document entry class.

      completeValidation()
              if ( !MaintenanceDocumentRule.class.isAssignableFrom( getBusinessRulesClass() ) ) {
                  throw new DataDictionaryException( "ERROR: Business rules class for KNS Maintenance document entry " + getBusinessRulesClass().getName() + " does not implement the expected " + MaintenanceDocumentRule.class.getName() + " interface.");
              }
      
      afterPropertiesSet()
              if ( getBusinessRulesClass() == null || getBusinessRulesClass().equals(MaintenanceDocumentRuleBase.class) ) {
                  setBusinessRulesClass(org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRuleBase.class);
              }
      

        Issue Links

          Activity

          Hide
          Jonathan Keller added a comment -

          If you make the validation fix, the following documents will kick out:

          class org.kuali.rice.krad.rules.MaintenanceDocumentRuleBase is being used on a KNS maintenance document: class org.kuali.rice.coreservice.impl.namespace.NamespaceBo
          class org.kuali.rice.krad.rules.MaintenanceDocumentRuleBase is being used on a KNS maintenance document: class org.kuali.rice.coreservice.impl.parameter.ParameterTypeBo
          class org.kuali.rice.krad.rules.MaintenanceDocumentRuleBase is being used on a KNS maintenance document: class org.kuali.rice.coreservice.impl.component.ComponentBo
          class org.kuali.rice.coreservice.web.parameter.ParameterRule is being used on a KNS maintenance document: class org.kuali.rice.coreservice.impl.parameter.ParameterBo
          class org.kuali.rice.kew.document.DocumentTypeMaintainableBusRule is being used on a KNS maintenance document: class org.kuali.rice.kew.doctype.bo.DocumentType
          
          Show
          Jonathan Keller added a comment - If you make the validation fix, the following documents will kick out: class org.kuali.rice.krad.rules.MaintenanceDocumentRuleBase is being used on a KNS maintenance document: class org.kuali.rice.coreservice.impl.namespace.NamespaceBo class org.kuali.rice.krad.rules.MaintenanceDocumentRuleBase is being used on a KNS maintenance document: class org.kuali.rice.coreservice.impl.parameter.ParameterTypeBo class org.kuali.rice.krad.rules.MaintenanceDocumentRuleBase is being used on a KNS maintenance document: class org.kuali.rice.coreservice.impl.component.ComponentBo class org.kuali.rice.coreservice.web.parameter.ParameterRule is being used on a KNS maintenance document: class org.kuali.rice.coreservice.impl.parameter.ParameterBo class org.kuali.rice.kew.document.DocumentTypeMaintainableBusRule is being used on a KNS maintenance document: class org.kuali.rice.kew.doctype.bo.DocumentType
          Hide
          Shannon Hess added a comment -

          The changes you recommended above have been made to the rice-2.1-kfs branch, and I have corrected the KNS-based maintenance document classes that were using the KRAD classes.

          Changes were made to the following files:

          • ParameterRule.java
          • ComponentMaintenanceDocument.xml
          • NamespaceMaintenanceDocument.xml
          • ParameterTypeMaintenanceDocument.xml
          • DocumentTypeMaintainableBusRule.java
          • org.kuali.rice.kns.datadictionary.MaintenanceDocumentEntry.java

          Thanks,
          Shannon

          Show
          Shannon Hess added a comment - The changes you recommended above have been made to the rice-2.1-kfs branch, and I have corrected the KNS-based maintenance document classes that were using the KRAD classes. Changes were made to the following files: ParameterRule.java ComponentMaintenanceDocument.xml NamespaceMaintenanceDocument.xml ParameterTypeMaintenanceDocument.xml DocumentTypeMaintainableBusRule.java org.kuali.rice.kns.datadictionary.MaintenanceDocumentEntry.java Thanks, Shannon
          Hide
          Jessica Coltrin (Inactive) added a comment -

          closing all 2.1.2 Jiras

          Show
          Jessica Coltrin (Inactive) added a comment - closing all 2.1.2 Jiras

            People

            • Assignee:
              Shannon Hess
              Reporter:
              Jonathan Keller
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Structure Helper Panel