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

Error messages need to be resolved on the remote services

    Details

    • Type: Bug Fix Bug Fix
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Backlog
    • Component/s: Development
    • Security Level: Public (Public: Anyone can view)
    • Labels:
    • Similar issues:
      KULRICE-6558Resolve remoting situation for string coercion service used for proposition validation
      KULRICE-4668Evaluate remote KIM services: implementation
      KULRICE-3323remote service invocations failing in load balanced scenario
      KULRICE-5224Convert RuleValidationAttribute to a remotable SOAP service
      KULRICE-9642Error message not being resolved
      KULRICE-5319Implement caching on remote soap services
      KULRICE-6509Synchronize with remote services on KSB startup
      KULRICE-12874Resolve issue with failing IT tests erroring with HTTP response: status code = 503, status message = [Service Unavailable]
      KULRICE-6511Implement ability to load remote services lazily
      KULRICE-4666Evaluate "remote" KIM services
    • Rice Module:
      KRAD
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required

      Description

      Currently the remote services pass back the error message key for remote attribute validations and then Rice resolves them. However, with truly remote service this will not be possible as the local rice instance won't be able to resolve remote service. Instead the actual error message that is being displayed to the user should be passed back from the remote service.


      Claus: Back to my question, does the error builder of RemotableAttributeError support error message with arguments (ie "This error

      {0}

      !")?

      Eric: no it does not and it's not supposed to, the idea being that messages will be resolved from local resource bundles before passing them back across the wire

      because say an application like kc was producing error messages, it would likely have some external message bundle for i18n, but it should resolve those outbound error messages prior to sending them to rice (in the case of this coming from something like an ActionTypeService, AgendaTypeService, whatever) because Rice has no idea about KC's local error message information and shouldn't need to

      Claus: So you are saying the remote service will send the actual error message that is displayed to the user? Because that's not what's happening currently. KRMS is setup to accept an error message key (i.e. peopleFlow.peopleFlowId.require), not the actual error message. KRAD (in ErrorsFields.getMessages()) then looks up the actual message (i.e. "PeopleFlow ID is required.") from the appropriate ApplicationResources.properties file (in this case KEW's).

      Eric: yeah, that's not the way it should be working, peopleflow comes from kew, so we should assume that KRMS should not even have access to kew's ApplicationResources.properties

      in practice it does because our current modularity sucks

      but imagine that KC was creating a custom action type in KRMS

      we won't have their ApplicationResources.properties available to us on the KRMS side

      so if we are getting error messages from a RemotableAttributeError, they need to be pre-resolved

      now, on the KC side in that case, they would probably do something similar to what you are doing in order to resolve the actual error message before sending it across the wire

      does that make sense?

      Claus: Uh, oh! We'll need to fix that then before the release. There is the KRMS part and the remote services we'll need to fix. I'll create a Jira for it.

      It makes sense and I understand it.

      Eric: cool, yeah we can just treat it as a bug

        Issue Links

          Activity

          Hide
          Rice-CI User (Inactive) added a comment -

          Integrated in rice-trunk-nightly #255 (See http://ci.rice.kuali.org/job/rice-trunk-nightly/255/)
          KULRICE-5893 resolved some AttributeError messages via the ConfigurationService

          Show
          Rice-CI User (Inactive) added a comment - Integrated in rice-trunk-nightly #255 (See http://ci.rice.kuali.org/job/rice-trunk-nightly/255/ ) KULRICE-5893 resolved some AttributeError messages via the ConfigurationService
          Hide
          Aaron Hamid (Inactive) added a comment -

          DataDictionarySearchableAttribute, PeopleFlowActionTypeService and the sample app CampusAgendaTypeService have been updated to resolve error message keys from the KRAD ConfigurationService.

          In KIM, IdentityMangementPersonDocumentRule and IdentityMangementRoleDocumentRule are using some interesting syntax to describe the error message which could possibly be some form of serialization for reconstitution in the consumer, so I didn't want to go ahead and update these without getting feedback on it. It looks like these would fit straight into a message format with arguments.

          Show
          Aaron Hamid (Inactive) added a comment - DataDictionarySearchableAttribute, PeopleFlowActionTypeService and the sample app CampusAgendaTypeService have been updated to resolve error message keys from the KRAD ConfigurationService. In KIM, IdentityMangementPersonDocumentRule and IdentityMangementRoleDocumentRule are using some interesting syntax to describe the error message which could possibly be some form of serialization for reconstitution in the consumer, so I didn't want to go ahead and update these without getting feedback on it. It looks like these would fit straight into a message format with arguments.
          Hide
          Rice-CI User (Inactive) added a comment -

          Integrated in rice-trunk-nightly #256 (See http://ci.rice.kuali.org/job/rice-trunk-nightly/256/)
          KULRICE-5893 - fix, campusAgendaTypeService problem

          Show
          Rice-CI User (Inactive) added a comment - Integrated in rice-trunk-nightly #256 (See http://ci.rice.kuali.org/job/rice-trunk-nightly/256/ ) KULRICE-5893 - fix, campusAgendaTypeService problem
          Hide
          Jerry Neal (Inactive) added a comment -

          Note on this: In order to translate the RemotableAttributeError to the MessageMap, we need to enhance the MessageMap to take in the actual error message (right now you can only add errors with the error key). KRADs ErrorsField will also need modified to check for the actual message in the MessageMap instead of the key.

          Hopefully we can keep KNS the way it is, and when we convert KIM to KRAD it will use the new infrastructure.

          Show
          Jerry Neal (Inactive) added a comment - Note on this: In order to translate the RemotableAttributeError to the MessageMap, we need to enhance the MessageMap to take in the actual error message (right now you can only add errors with the error key). KRADs ErrorsField will also need modified to check for the actual message in the MessageMap instead of the key. Hopefully we can keep KNS the way it is, and when we convert KIM to KRAD it will use the new infrastructure.
          Hide
          Jerry Neal (Inactive) added a comment -

          Aaron,

          I would recommend we leave the current KIM error handling the way it currently is. Once we convert to KRAD we can modify to use the RemotableAttributeError.

          Jerry

          Show
          Jerry Neal (Inactive) added a comment - Aaron, I would recommend we leave the current KIM error handling the way it currently is. Once we convert to KRAD we can modify to use the RemotableAttributeError. Jerry
          Hide
          Eric Westfall added a comment -

          Bulk update of incomplete 2.0.0-b2 issues to just a 2.0 fix version.

          Show
          Eric Westfall added a comment - Bulk update of incomplete 2.0.0-b2 issues to just a 2.0 fix version.
          Hide
          Peter Giles (Inactive) added a comment -

          Changing the lead to Jeremy since this one is assigned to Aaron.

          Show
          Peter Giles (Inactive) added a comment - Changing the lead to Jeremy since this one is assigned to Aaron.
          Hide
          Peter Giles (Inactive) added a comment -

          Moving the lead to Jerry and the module to KRAD. Could we change the behavior on the server side to first look for a message from the ApplicationResources.properties (so KIM will continue to work), and if it is not found, display the literal String? This would work in the interim for both KIM and KRMS, and will continue to work for applications & modules that do this the (new) correct way.

          Show
          Peter Giles (Inactive) added a comment - Moving the lead to Jerry and the module to KRAD. Could we change the behavior on the server side to first look for a message from the ApplicationResources.properties (so KIM will continue to work), and if it is not found, display the literal String? This would work in the interim for both KIM and KRMS, and will continue to work for applications & modules that do this the (new) correct way.

            People

            • Assignee:
              Unassigned
              Reporter:
              Claus Niesen
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Structure Helper Panel