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

Add rule cannot read proposition property at initialization phase

    Details

    • Type: Bug Fix Bug Fix
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.5.1
    • Component/s: Development
    • Security Level: Public (Public: Anyone can view)
    • Labels:
      None
    • Similar issues:
      KULRICE-12687KRMS Agenda cannot add a proposition due to security
      KULRICE-5900Can not add a proposition to a new rule
      KULRICE-11868Expression error in testColumnCalculations during apply model phase
      KULRICE-5724Add Proposition Functionality
      KULRICE-6294Validation of proposition constants on add rule
      KULRICE-5575Rule Editor: Edit Proposition. Add ability to edit a proposition.
      KULRICE-5546Implement 'add proposition' and 'edit proposition' features on the rule editor
      KULRICE-12690Performance issues at the apply-model phase in KS
      KULRICE-11415KRMS: Rules: cannot save more than 2 rules
      KULRICE-12300KRMS - Add Parent to blank proposition causes exception
    • Rice Team:
      Middleware
    • KRAD Feature Area:
      UIF Component
    • Sprint:
      Middleware 2.5.1 Sprint 1
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required
    • Code Review Status:
      Not Required
    • Include in Release Notes?:
      Yes
    • Story Points:
      5

      Description

      Error is being produced when the add rule. Run through the following steps:

      Open rice portal
      Login as admin
      Select Main Tab - Agenda Lookup link
      Perform Search
      Select 'edit' link on One Big Rule element
      Select 'Add Rule' element
      Select 'validation rule' in Rule Type Dropdown
      Select 'add' button for proposition

      Reviewing logs will see:

      2014-09-25 17:33:04,097 [http-bio-8080-exec-20] u:admin/d: WARN  org.kuali.rice.krad.uif.util.ObjectPropertyReference - java.lang.IllegalArgumentException: No property name 'proposition' is readable or writable on class org.kuali.rice.krms.impl.ui.AgendaEditor
      

      Error occurs when trying to read the proposition data from rule editor TreeGroup componentPrototype (comoponentPrototypes[3].items[1].inputDataField) at the initialization phase (initializeDataFieldFromDictionaryTask). I'm trying to decide whether it should be called at all as it is searching for a nested object which is part of componentPrototypes and getComponentPrototypes has a view lifecycle restriction on initialize phase.

        Issue Links

          Activity

          Hide
          Peter Giles (Inactive) added a comment -

          Hey Martin, can you add some more detail on what the symptoms of this are from the user's point of view (to help with prioritization)? Thanks

          Show
          Peter Giles (Inactive) added a comment - Hey Martin, can you add some more detail on what the symptoms of this are from the user's point of view (to help with prioritization)? Thanks
          Hide
          Claus Niesen added a comment -

          This error doesn't appear to impact the functionality required by the user. According to Martin, the error might be caused during some lifecycle processing that is not needed.

          Show
          Claus Niesen added a comment - This error doesn't appear to impact the functionality required by the user. According to Martin, the error might be caused during some lifecycle processing that is not needed.
          Hide
          Peter Giles (Inactive) added a comment -

          Not positive, but KULRICE-13314 could be a dup of this.

          Show
          Peter Giles (Inactive) added a comment - Not positive, but KULRICE-13314 could be a dup of this.
          Hide
          Sona Sona (Inactive) added a comment - - edited

          Two things going on here. The annotation @ViewLifecycleRestriction(UifConstants.ViewPhases.INITIALIZE) on getComponentPrototypes in TreeGroup is indicating that the INITIALIZE phase is the only phase that applies here and not the other way round. I don't think we should remove the initialization of componentPrototypes as that allows KRAD to do some initialization of the tree's prototype components.

          The warnings I believe are harmless. KRAD thinks that all the prototype components are part of AgendaEditor as it does not know that the TreeGroup will later on modify the bindingPath in it's applyModel. For initial lifecycle phases, KRAD assumes that the components will be rendered as part of the AgendaEditor's initial view. This causes the bindingPath on those component's to be evaluated against AgendaEditor. These components are rendered through TreeGroup which knows that before rendering the prototype components, it should re-evalute the binding paths to the appropriate RuleBo/Proposition and hence the values display without any issues.

          If I turn INITIALIZE phase off on the prototypeComponents the WARN about proposition goes away but a new set of warnings show up for agendaRuleTree.rootElement.children.data.agendaItemLine on AgendaEditor. This is due to the fact that children is an ArrayList and we are not asking for a binding to a specific childNode but to the generic agendaItemLine. Again the TreeGroup's applyModel will take care of the actual binding.

          Show
          Sona Sona (Inactive) added a comment - - edited Two things going on here. The annotation @ViewLifecycleRestriction(UifConstants.ViewPhases.INITIALIZE) on getComponentPrototypes in TreeGroup is indicating that the INITIALIZE phase is the only phase that applies here and not the other way round. I don't think we should remove the initialization of componentPrototypes as that allows KRAD to do some initialization of the tree's prototype components. The warnings I believe are harmless. KRAD thinks that all the prototype components are part of AgendaEditor as it does not know that the TreeGroup will later on modify the bindingPath in it's applyModel. For initial lifecycle phases, KRAD assumes that the components will be rendered as part of the AgendaEditor's initial view. This causes the bindingPath on those component's to be evaluated against AgendaEditor. These components are rendered through TreeGroup which knows that before rendering the prototype components, it should re-evalute the binding paths to the appropriate RuleBo/Proposition and hence the values display without any issues. If I turn INITIALIZE phase off on the prototypeComponents the WARN about proposition goes away but a new set of warnings show up for agendaRuleTree.rootElement.children.data.agendaItemLine on AgendaEditor. This is due to the fact that children is an ArrayList and we are not asking for a binding to a specific childNode but to the generic agendaItemLine. Again the TreeGroup's applyModel will take care of the actual binding.
          Hide
          Kristina Taylor (Inactive) added a comment -

          Ok. Looks good for now then.

          Show
          Kristina Taylor (Inactive) added a comment - Ok. Looks good for now then.
          Hide
          Martin Taylor (Inactive) added a comment -

          Closing 2.5.1 Development

          Show
          Martin Taylor (Inactive) added a comment - Closing 2.5.1 Development

            People

            • Assignee:
              Sona Sona (Inactive)
              Reporter:
              Martin Taylor (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Agile

                  Structure Helper Panel