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

KimDocumentRoleMemberLookupableHelperServiceImpl confused by multiple docs

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.0.2.1
    • Fix Version/s: Backlog
    • Component/s: Development
    • Labels:
    • Rice Module:
      KIM
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required

      Description

      I believe that the KimDocumentRoleMemberLookupableHelperServiceImpl needs to have a talk with its doctor...about idempotence.

      From what I can tell, there's likely a requirement for the KIM Role IM doc that it allow members added to the role on the doc to be delegated from as well on the same doc. To deal with that, KimDocumentRoleMemberLookupableHelperServiceImpl takes a Role IM doc from the session (where the KIM Role IM action puts it) and pulls role members from that; if the doc in the session is nulll, it uses the regular lookup.

      I first noticed this behavior when I opened a Person IM Role Doc and a Role IM role doc simultaneously. The Person IM Role doc also uses KimDocumentRoleMemberLookupableHelperServiceImpl to find delegates, and what happened was I would get back bogus role members because the lookup was looking at the role doc.

      This was during consulting work for UA, and UA forked Rice for a bit. So I fixed it by pulling the doc # and the role id # from the fieldValues passed into KimDocumentRoleMemberLookupableHelperServiceImpl's search method. However, there's still a problem: if I open two Role IM docs at the same time, I think that there could be race conditions here.

      Part of the issue is the name of the doc in the session - always KimConstants.KimUIConstants.KIM_ROLE_DOCUMENT_SHORT_KEY. At the very least, the docFormId should be tacked on to that. But I don't know if that's going to solve the issues the lookup presents. Therefore, I was hoping that the experts could take a look.

        Attachments

          Issue Links

            Activity

            Hide
            jksmith James Smith added a comment -

            Added Kymber as a watcher.

            Show
            jksmith James Smith added a comment - Added Kymber as a watcher.
            Hide
            jksmith James Smith added a comment -

            Added Natalie as a watcher. Natalie discovered this issue.

            Show
            jksmith James Smith added a comment - Added Natalie as a watcher. Natalie discovered this issue.
            Hide
            jjhanso Jeremy Hanson added a comment -

            Garey and I thought this one was a bit weird, so assigning to Eric at the moment.

            Show
            jjhanso Jeremy Hanson added a comment - Garey and I thought this one was a bit weird, so assigning to Eric at the moment.

              People

              • Assignee:
                Unassigned
                Reporter:
                jksmith James Smith
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - 1 day
                  1d
                  Remaining:
                  Remaining Estimate - 1 day
                  1d
                  Logged:
                  Time Spent - Not Specified
                  Not Specified