[KULRICE-8180] Need a way to control what properties are serialized in maintenance documents. Created: 12/Sep/12  Updated: 17/Jan/13  Resolved: 10/Dec/12

Status: Closed
Project: Kuali Rice Development
Component/s: Development
Affects Version/s: None
Fix Version/s: 2.1.3
Security Level: Public (Public: Anyone can view)

Type: Improvement Priority: Major
Reporter: Gayathri Athreya Assignee: Corey Pedersen (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Rely
Rice Module:
KRAD
Application Requirement:
KC
KAI Review Status: Not Required
KTI Review Status: Not Required

 Description   

Maint Docs are persisting the whole object tree into the document content table and this appears to be unnecessary. Is there a way to limit the serialization of properties on the maintenance documents like there is for the transactional documents? If not, can a change be made in KRAD to make the serialization of properties smarter?



 Comments   
Comment by Sona Sona (Inactive) [ 01/Oct/12 ]

Here is my understanding of why <workflowProperties> is not being using to limit the serialization of maintenance documents. In case of maint docs on save, the business objects for the maintenance documents are serialized to XML. Once the document is enroute, and a user opens the doc back up the business object is deserialized from the XML representation stored in KRNS_DOC_HDR_T using XStream and set on the maintenance document. Once all approvals have been gathered against the document, the document is loaded from the database deserializing the business objects from the XML content stored on KRNS_MAINT_DOC_T and the doRouteStatusChangeEvent is invoked. Only when the document is processed does the business object get persisted into the db. Until then all the data incase of maint docs is kept on the XML. This is not the case with Transactional documents where the data is stored in intermediate tables until its processed.

https://wiki.kuali.org/display/KFSOLD/Specifying+Document+Properties+to+Serialize+for+Workflow+in+the+Data+Dictionary talks about how you can specify which properties you want to serialize. The document does say that </workflowProperties> can be used for both transactional as well as maintenance docs though I was not able to find an example where its being used in maintainence documents to specify multiple properties of a document in the rice codebase. The ones I found are serializing the main business object.

<workflowProperties>
<workflowPropertyGroup>
<workflowProperty path="oldMaintainableObject.businessObject" />
<workflowProperty path="newMaintainableObject.businessObject" />
</workflowPropertyGroup>
</workflowProperties>

Comment by Gayathri Athreya [ 11/Oct/12 ]

I spoke to KFS about this per Jerry's suggestion and one way to control what gets serialized is to set the "workflow attributes" in the maintenance document data dictionary. I believe they had a similar issue and actually wrote the code that does this. Jerry however suggested during the KTI that maybe KRAD could be "smarter" about what it serializes so it may still be worth pursuing.

Comment by Peter Giles (Inactive) [ 11/Oct/12 ]

Hi Gayathri, apologies if this is something we've gone over and I forgot it – Can you give a specific example of a property on a maintenance document that you wouldn't want serialized in the XML? I have a better grasp on how this applies to transactional documents than maintenance docs. Thanks!

Comment by Gayathri Athreya [ 22/Oct/12 ]

If you look in our Financial Object Code Mapping maintenance document on this server (http://test.kc.kuali.org/kc-intg/portal.do?selectedTab=portalMaintenanceBody) you will notice that it links to several business objects like Unit, Rate Class Code, Rate Type Code etc. Unit itself links to Organization which in turn has collections of other BOs. While saving the Financial Object Code Mapping document, the entire object graph is saved, which means that all the Organizations and their associated collections get saved which seems unnecessary. As I noted in the previous comment, adding workflow attributes to our maintenance docs gets rid of most of this data but maybe KRAD can be smarter about the information it tries to save.

Comment by Peter Giles (Inactive) [ 25/Oct/12 ]

Thanks Gayathri, that makes it more concrete for me. Is KC wanting us to support this sort of limiting serialization of the object tree by adding additional structure to the data dictionary, or via some specific other mechanism? Or are you hoping we can come up with a good suggestion?

Comment by Gayathri Athreya [ 29/Nov/12 ]

Hi Peter, sorry I completely lost track of this jira. So, I have tried using workflow attributes in our maintenance documents like KFS does and it does prevent the properties from being serialized.I want to test it in a few more documents to make sure it does indeed work the way we want it to. If it does, that would be enough for the time being and I will resolve this jira. Thanks.

Comment by Corey Pedersen (Inactive) [ 10/Dec/12 ]

Issue being set to resolved and can be reopened if further testing by Gayathri indicates need.

Comment by Gayathri Athreya [ 17/Jan/13 ]

Setting workflowProperties in our documentType fixes this issue, closing.

Generated at Tue Jan 19 20:43:33 CST 2021 using JIRA 7.0.11#70121-sha1:19d24976997c1d95f06f3e327e087be0b71f28d4.