[progress Communities] [progress Openedge Abl] Forum Post: Re: How To Handle Errors From...

  • Thread starter Thread starter egarcia
  • Start date Start date
Status
Not open for further replies.
E

egarcia

Guest
Hello Louise, Many thanks for the feedback. It is appreciated. It helps to know that you plan on using a single transaction model (all or none). Certainly, you have a very custom Business Entity by using a web handler configuration. This should work fine. The key is to meet same protocol used with generated Business Entities (consistent request and response payloads for CRUD, Submit, and Invoke operations.) Using EMPTY as the fill mode is fine. The fill() method in the JSDO expects that. Generating the catalog by creating a REST (or WebHandler) service and copying the file is ok. (Another alternative is to generate the catalog yourself and match the definition by using a catalog generated from PDSOE as an example. Here is a sample on a dynamic/generic service that uses this concept: community.progress.com/.../2677) Regarding the error messages. I am guessing that the issue is happening because a mismatch in the response received by the JSDO. What does the payload look like? Is prods:clientId present in the after table? Is the error message returned as prods:error? Here is an example for a test a sample app: oemobiledemo.progress.com/.../ListView_FormWithCRUD Response: { "dsEmployee": { "prods:hasChanges": true, "ttEmployee": [{ "prods:id": "ttEmployee428288", "prods:rowState": "created", "prods:hasErrors": true, "prods:clientId": "1495632869659-63", "EmpNum": 0, "LastName": "Hall", "FirstName": "Mark", "Address": "", "Address2": "", "City": "", "State": "", "PostalCode": "", "HomePhone": "", "WorkPhone": "", "DeptCode": "", "Position": "", "Birthdate": "2015-11-24", "StartDate": "2015-11-24", "VacationDaysLeft": 0, "SickDaysLeft": 0 }], "prods:before": {}, "prods:errors": { "ttEmployee": [{ "prods:id": "ttEmployee428288", "prods:error": "** Employee already exists with Last Name \"Hall\" First Name \"Mark\". (132)" }] } } } I hope this helps, Edsel

Continue reading...
 
Status
Not open for further replies.
Back
Top