Openbravo Issue Tracking System - Retail Modules
View Issue Details
0038626Retail ModulesWeb POSpublic2018-05-24 17:442018-06-25 09:04
migueldejuana 
migueldejuana 
normalmajoralways
closedfixed 
5
 
RR18Q2.1RR18Q2.1 
marvintm
No
0038626: Avoid loosing orders if backend throws exception while inserting import entry
When an order is send to backend, it is removed from local database when we get the success response. It is remove because the import entry is created and no need to have the message in local database.

There is one case thaht is not covered. When synchornizating the message, in the process of inserting the import entry we could throw an exception(i.e.: The backend timeout finish before client timeout. Wring development). This exception is send as success with status -1. Wrongly, we are considering it as a success and we remove the message loosing the order.
- Add an exception in the process of saving the Import Entry. In WebServiceAuthenticatedServlet for example.
- Create an order and process it
- ERROR! The Exception will be thrown, the import entry is not created and the message is removed from local database.
In the success callback, if the status is -1, do not remove the message and call error callback.
No tags attached.
blocks defect 0038621 closed migueldejuana Avoid loosing orders if backend throws exception while inserting import entry 
Issue History
2018-05-25 10:12migueldejuanaTypedefect => backport
2018-05-25 10:12migueldejuanaTarget Version => RR18Q2.1
2018-06-22 13:36migueldejuanaNote Added: 0105344
2018-06-22 13:36migueldejuanaStatusscheduled => resolved
2018-06-22 13:36migueldejuanaResolutionopen => fixed
2018-06-25 09:04marvintmReview Assigned To => marvintm
2018-06-25 09:04marvintmStatusresolved => closed
2018-06-25 09:04marvintmFixed in Version => RR18Q2.1

Notes
(0105344)
migueldejuana   
2018-06-22 13:36   
Repository: retail/backports/3.0RR18Q2.1/org.openbravo.mobile.core
Changeset: 46107eed74ff1fe645269105ce82650fa1dddee2
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Fri May 25 10:07:56 2018 +0200
URL: http://code.openbravo.com/retail/backports/3.0RR18Q2.1/org.openbravo.mobile.core/rev/46107eed74ff1fe645269105ce82650fa1dddee2 [^] [^]

Fixed issue 0038621: Avoid loosing orders if backend throws exception while inserting import entry

- Handle response with status -1 and follow the error flow to do not remove the message which couldn't be saved

---
M web/org.openbravo.mobile.core/source/data/ob-requestrouter.js