[KULRICE-5893] Error messages need to be resolved on the remote services Created: 02/Nov/11  Updated: 16/Jan/15

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

Type: Bug Fix Priority: Major
Reporter: Claus Niesen Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: Old
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Discovered
discovered KULRICE-5894 Improve documentation of AttributeErr... Closed
Rely
is relied upon by KULRICE-6948 KRMS is treating RemotableAttributeEr... Open
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



 Comments   
Comment by Rice-CI User (Inactive) [ 16/Nov/11 ]

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

Comment by Aaron Hamid (Inactive) [ 16/Nov/11 ]

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.

Comment by Rice-CI User (Inactive) [ 17/Nov/11 ]

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

Comment by Jerry Neal (Inactive) [ 21/Nov/11 ]

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.

Comment by Jerry Neal (Inactive) [ 21/Nov/11 ]

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

Comment by Eric Westfall [ 22/Nov/11 ]

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

Comment by Peter Giles (Inactive) [ 06/Jan/12 ]

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

Comment by Peter Giles (Inactive) [ 03/Feb/12 ]

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.

Generated at Tue Sep 29 20:08:29 CDT 2020 using JIRA 7.0.11#70121-sha1:19d24976997c1d95f06f3e327e087be0b71f28d4.