Uploaded image for project: 'Kuali Rice Development'
  1. Kuali Rice Development
  2. KULRICE-8179

Rice KEW considers Maps as 'simple' properties and serializes them and persists them in the database.

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1.3
    • Component/s: Development
    • Security Level: Public (Public: Anyone can view)
    • Labels:
      None
    • Rice Module:
      KRAD
    • KRAD Feature Area:
      KEW Integration
    • Application Requirement:
      KC
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required

      Description

      KC Time and Money documents are persisting a decent amount of data into the KREW_DOC_HDR_CNTNT_T table because the 'document' contains a number of 'simple' hashmaps.

      This happens in PropertySerializerTrie.addSerializablePropertyName when the propertyName 'document' is passed in. Which always happens as the document should be persisted. It then sets that object to serialize all simple properties. In PropertySerializabilityEvaluatorBase.determinePropertyType it determine primitive objects to be anything that is not a BO and a Collection. As Maps are neither, all maps on our documents are persisted in the Doc Content XML. This seems to be an oversight as collections are not included and should be reviewed.

      Should maps be a separate property type in determinePropertyType or is there a better way to use the workflowProperties to control which properties on the document are serialized and thereby not serialize unnecessary maps on KC documents. KC currently has a few documents that have multiple maps in them and serializing these documents leads to a large amount of data being persisted in the database.

        Attachments

          Issue Links

            Activity

            Hide
            gilesp Peter Giles (Inactive) added a comment -

            Gayathri, this jira is for trans docs and KULRICE-8180 is for maintenance documents, right? Thanks

            Show
            gilesp Peter Giles (Inactive) added a comment - Gayathri, this jira is for trans docs and KULRICE-8180 is for maintenance documents, right? Thanks
            Hide
            gathreya Gayathri Athreya added a comment -

            Yes Peter, correct.

            Show
            gathreya Gayathri Athreya added a comment - Yes Peter, correct.
            Hide
            sonam Sona Sona (Inactive) added a comment -

            Gayathri, Could you send me the steps to reproduce this issue on http://test.kc.kuali.org/kc-dly/portal.do. Thanks

            Show
            sonam Sona Sona (Inactive) added a comment - Gayathri, Could you send me the steps to reproduce this issue on http://test.kc.kuali.org/kc-dly/portal.do . Thanks
            Hide
            gathreya Gayathri Athreya added a comment - - edited

            Hi Sona, in order to reproduce this, you can open up any document that uses HashMaps. In KC, you can try to create an Award document. Click on the green + button on the central admin panel next to Awards. Now try to fill in the required fields as follows:

            Description: Test
            Transaction Type: Administrative Amendment
            Lead Unit ID : 000001
            Activity Type : Research
            Award Type: Grant
            Award Title: Test
            Award Status: Active
            Sponsor ID: 000340
            Project End date: 09/30/2012

            Now try to save the award. When you do so, if you put a breakpoint at the "return PropertyType.Primitive" line in the determinePropertyType method in PropertySerialiabilityEvaluatorBase class, you will notice that when HashMaps are passed in as propertyValues, the PropertyType for those are returned as PropertyType.PRIMITIVE. In the AwardDocument, one such HashMap is the customAttributeDocuments HashMap. If you look in the xml persisted for the document (you can do this through the Document operation link in the Sys admin panel) , you will notice that this custmAttributeDocuments map is persisted by default because it is considered a primitive type.

            Show
            gathreya Gayathri Athreya added a comment - - edited Hi Sona, in order to reproduce this, you can open up any document that uses HashMaps. In KC, you can try to create an Award document. Click on the green + button on the central admin panel next to Awards. Now try to fill in the required fields as follows: Description: Test Transaction Type: Administrative Amendment Lead Unit ID : 000001 Activity Type : Research Award Type: Grant Award Title: Test Award Status: Active Sponsor ID: 000340 Project End date: 09/30/2012 Now try to save the award. When you do so, if you put a breakpoint at the "return PropertyType.Primitive" line in the determinePropertyType method in PropertySerialiabilityEvaluatorBase class, you will notice that when HashMaps are passed in as propertyValues, the PropertyType for those are returned as PropertyType.PRIMITIVE. In the AwardDocument, one such HashMap is the customAttributeDocuments HashMap. If you look in the xml persisted for the document (you can do this through the Document operation link in the Sys admin panel) , you will notice that this custmAttributeDocuments map is persisted by default because it is considered a primitive type.
            Hide
            gathreya Gayathri Athreya added a comment -

            If this is complicated please do not hesitate to ping me on Skype.

            Show
            gathreya Gayathri Athreya added a comment - If this is complicated please do not hesitate to ping me on Skype.
            Hide
            sonam Sona Sona (Inactive) added a comment -

            Got it. Thanks. I was trying to manipulate the Award from the Researcher tab and kept running into 'document is locked ' errors.

            Show
            sonam Sona Sona (Inactive) added a comment - Got it. Thanks. I was trying to manipulate the Award from the Researcher tab and kept running into 'document is locked ' errors.
            Hide
            sonam Sona Sona (Inactive) added a comment -

            Added Map as another property type.

            Show
            sonam Sona Sona (Inactive) added a comment - Added Map as another property type.
            Hide
            gathreya Gayathri Athreya added a comment -

            Thanks Sona, will this fix be part of 2.1.3 when that branch is created?

            Show
            gathreya Gayathri Athreya added a comment - Thanks Sona, will this fix be part of 2.1.3 when that branch is created?
            Hide
            sonam Sona Sona (Inactive) added a comment -

            Hi Gayathri, Yes this will be part of 2.1.3.

            Show
            sonam Sona Sona (Inactive) added a comment - Hi Gayathri, Yes this will be part of 2.1.3.
            Hide
            gathreya Gayathri Athreya added a comment -

            great, thanks!

            Show
            gathreya Gayathri Athreya added a comment - great, thanks!
            Hide
            gathreya Gayathri Athreya added a comment -

            Maps no longer considered 'simple' property. Works as expected, closing issue.

            Show
            gathreya Gayathri Athreya added a comment - Maps no longer considered 'simple' property. Works as expected, closing issue.

              People

              • Assignee:
                sonam Sona Sona (Inactive)
                Reporter:
                gathreya Gayathri Athreya
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: