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

Unable to change rule action from Validation to Route to Peopleflow / Notify PeopleFlow

    Details

    • Type: Bug Fix Bug Fix
    • Status: Closed Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.3.2
    • Fix Version/s: 2.3.3, 2.4
    • Component/s: Development
    • Security Level: Public (Public: Anyone can view)
    • Labels:
      None
    • Similar issues:
      KULRICE-6003Make PeopleFlow type service names friendlier to humans
      KULRICE-6576PeopleFlow Action Id lookup throws NPE
      KULRICE-13960Close/Clear Values/Search Buttons too far down on Agenda Editor PeopleFlow ID lookup screen
      KULRICE-6277Apply Database changes for PeopleFlow Action Name
      KULRICE-13312KRMS rule's action attributes not loaded for edit succesfully
      KULRICE-8968PeopleFlow Maintenance Document - Unable to set ApprovePolicy when PeopleFlow Member is of type Group
      KULRICE-14150STE on Peopleflow
      KULRICE-6365On rule screen, PeopleFlow ID lookup for action types can pull in bogus parameters
      KULRICE-13095PeopleFlow Routing Sequence on Reroute different from original route
      KULRICE-13913Fill AFT Gap: KRMS Rules - Agenda Editor (add Actions of various types)
    • Rice Module:
      KRMS
    • Application Requirement:
      KC
    • Sprint:
      2.4.0-m3 KRAD Sprint 4
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required
    • Code Review Status:
      Not Required
    • Include in Release Notes?:
      Yes

      Description

      Steps to reproduce on env2

      Create an agenda made of one rule,
      Add 1 proposition
      Select validation action.
      Update Rule
      Blanket Approve

      Search for Agenda
      Edit Rule
      Change Action to a different Action. Example, notify peopleflow
      Update Rule
      Blanket Approve
      Open Document Search and see that the document is Enroute and eventually goes into Exception

      This is the error in the logs

      ATTR_DEFN_ID cannot be null.
      

      The customRuleActionAttributesMap in the AgendaEditor needs to be refreshed when the peopleFlow action is changed. Otherwise, the AgendaEditor holds onto the old ruleActionAttributes for validation as well as the new ruleActionAttributes. If you go from notifuPeopleFlow to routeToPeopleFlow, this will not be a problem because the attributes for ruleAction in this case remain the same, which are peopleFlowId and peopleFlowName. whereas while going from validation to peopleFlow or vice versa, it changes from the validation message and the validation type (Error or warning) to the peopleFlow ones. One possible way to fix this would be to refresh this customRuleActionAttributesMap map when the action type id is changed.

      To see what I mean, put a break point in the following code after agendaBO once you blanket approve and examine the agendaBO data.

      AgendaEditorMaintainable.class
      public void saveDataObject() {
              AgendaBo agendaBo = ((AgendaEditor) getDataObject()).getAgenda();
      

      If you drill down all the way to AgendaBO>items>AgendaItemBO>RuleBO>Actions>ActionBO>attributeBOs
      you will see that there are more attributes than the ones required for the agenda action. There should only be 2 attributeBOs each for validation action and routeToPeopleFlow/Notify PeopleFlow actions.

        Activity

        Hide
        Gayathri Athreya added a comment -

        Working now, thanks!!

        Show
        Gayathri Athreya added a comment - Working now, thanks!!
        Hide
        Gayathri Athreya added a comment -

        Awesome, thanks Shannon!

        Show
        Gayathri Athreya added a comment - Awesome, thanks Shannon!
        Hide
        Shannon Hess added a comment -

        This issue has been fixed. While testing I also was getting the following error when changing the rule action from validation to the KRMSActionResolverType so I also fixed that issue as well.

        java.lang.NullPointerException
        at org.kuali.rice.kns.datadictionary.validation.AttributeValidatingTypeServiceBase.validateAttributes(AttributeValidatingTypeServiceBase.java:151)
        at org.kuali.rice.krms.impl.type.KrmsTypeServiceBase.validateAttributes(KrmsTypeServiceBase.java:174)
        at org.kuali.rice.krms.impl.type.KrmsTypeServiceBase.validateAttributesAgainstExisting(KrmsTypeServiceBase.java:183)
        at org.kuali.rice.krms.impl.rule.AgendaEditorBusRule.validRuleActionAttributes(AgendaEditorBusRule.java:407)
        at org.kuali.rice.krms.impl.rule.AgendaEditorBusRule.validateRuleAction(AgendaEditorBusRule.java:347)
        at org.kuali.rice.krms.impl.rule.AgendaEditorBusRule.processAgendaItemBusinessRules(AgendaEditorBusRule.java:279)
        at org.kuali.rice.krms.impl.ui.AgendaEditorController.editRule(AgendaEditorController.java:671)
        at org.kuali.rice.krms.impl.ui.AgendaEditorController$$FastClassByCGLIB$$49b0d2b1.invoke(<generated>)
        at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:698)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
        at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96)
        at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:631)
        at org.kuali.rice.krms.impl.ui.AgendaEditorController$$EnhancerByCGLIB$$c7a4bc08.editRule(<generated>)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        
        Show
        Shannon Hess added a comment - This issue has been fixed. While testing I also was getting the following error when changing the rule action from validation to the KRMSActionResolverType so I also fixed that issue as well. java.lang.NullPointerException at org.kuali.rice.kns.datadictionary.validation.AttributeValidatingTypeServiceBase.validateAttributes(AttributeValidatingTypeServiceBase.java:151) at org.kuali.rice.krms.impl.type.KrmsTypeServiceBase.validateAttributes(KrmsTypeServiceBase.java:174) at org.kuali.rice.krms.impl.type.KrmsTypeServiceBase.validateAttributesAgainstExisting(KrmsTypeServiceBase.java:183) at org.kuali.rice.krms.impl.rule.AgendaEditorBusRule.validRuleActionAttributes(AgendaEditorBusRule.java:407) at org.kuali.rice.krms.impl.rule.AgendaEditorBusRule.validateRuleAction(AgendaEditorBusRule.java:347) at org.kuali.rice.krms.impl.rule.AgendaEditorBusRule.processAgendaItemBusinessRules(AgendaEditorBusRule.java:279) at org.kuali.rice.krms.impl.ui.AgendaEditorController.editRule(AgendaEditorController.java:671) at org.kuali.rice.krms.impl.ui.AgendaEditorController$$FastClassByCGLIB$$49b0d2b1.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:698) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:631) at org.kuali.rice.krms.impl.ui.AgendaEditorController$$EnhancerByCGLIB$$c7a4bc08.editRule(<generated>) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        Hide
        Peter Giles (Inactive) added a comment -

        Note that this fix should go into the rice-2.3 branch.

        Show
        Peter Giles (Inactive) added a comment - Note that this fix should go into the rice-2.3 branch.

          People

          • Assignee:
            Shannon Hess
            Reporter:
            Gayathri Athreya
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 1 day, 4 hours
              1d 4h
              Remaining:
              Remaining Estimate - 1 day, 4 hours
              1d 4h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Agile

                  Structure Helper Panel