Openbravo Issue Tracking System - Retail Modules
View Issue Details
0037327Retail ModulesWeb POSpublic2017-11-16 16:592017-12-22 12:50
migueldejuana 
migueldejuana 
urgentmajoralways
closedfixed 
5
 
RR17Q4RR17Q4 
marvintm
No
0037327: [SynchronizeMode] Wrong behaviour when server/connection goes down while synchronizing a message
Wrong behaviour when server/connection goes down while synchronizing a message.
When server goes down, the process of the message is cut and the Import Entry Archive remains in Initial status forever. When we do relogin in Web POS the Synchronizing popup is shown but the message is not processing so we get stucked.

When connection goes down, the process of the message is still running but we lost connection. When we recover connection in Web POS the Synchronizing popup dissapears and it shouldn't.
- Set Synchronize Mode
- Login
- Put a breakpoint in OrderLoader
- Do a sale
- The flow stops in the breakpoint and we shoul check 2 flows:
   1.1 Loose the connection wait until the offline message is shown
   1.2 Error! The popup dissapears and it should remain there
   
   2.1 Reset the server and relogin popup will be shown
   2.2 Do login again and the Synchronizing popup will be shown but the the message is not being processed and we get stucked
We will show Synchronizing popup untill know the that message is processed or not.
No tags attached.
blocks defect 0037313 closed migueldejuana [SynchronizeMode] Wrong behaviour when server/connection goes down while synchronizing a message 
Issue History
2017-11-20 14:03migueldejuanaTypedefect => backport
2017-11-20 14:03migueldejuanaTarget Version => RR17Q4
2017-12-21 16:29hgbotCheckin
2017-12-21 16:29hgbotNote Added: 0101185
2017-12-21 16:29hgbotStatusscheduled => resolved
2017-12-21 16:29hgbotResolutionopen => fixed
2017-12-21 16:29hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/1d71dae287769e338ccc1d53c7da130feba5a95f [^] => http://code.openbravo.com/retail/backports/3.0RR17Q4/org.openbravo.mobile.core/rev/36e191a2f91c57fd1698ea8d5e91369171f3ce81 [^]
2017-12-21 16:30hgbotCheckin
2017-12-21 16:30hgbotNote Added: 0101187
2017-12-21 16:30hgbotFixed in SCM revisionhttp://code.openbravo.com/retail/backports/3.0RR17Q4/org.openbravo.mobile.core/rev/36e191a2f91c57fd1698ea8d5e91369171f3ce81 [^] => http://code.openbravo.com/retail/backports/3.0RR17Q4/org.openbravo.retail.posterminal/rev/0dfed8533d2b1cfcf3c37a12fd28046bab74c0e9 [^]
2017-12-22 12:50marvintmStatusresolved => closed
2017-12-22 12:50marvintmFixed in Version => RR17Q4

Notes
(0101185)
hgbot   
2017-12-21 16:29   
Repository: retail/backports/3.0RR17Q4/org.openbravo.mobile.core
Changeset: 36e191a2f91c57fd1698ea8d5e91369171f3ce81
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Thu Dec 21 16:19:45 2017 +0100
URL: http://code.openbravo.com/retail/backports/3.0RR17Q4/org.openbravo.mobile.core/rev/36e191a2f91c57fd1698ea8d5e91369171f3ce81 [^]

Fixed issue 0037327: [SynchronizeMode] Wrong behaviour when server/connection goes down while synchronizing a message

- Don't retry the retry counter if we are in singleServer, it doesn't make sense
- Don't execute origFail in SynchronizeMode just because all servers are down, we will wait till get a response
- Retry executions if the import is being processed or if the connection/server is down
- If we are processing a message and we reload the page, a runsynchprocess will be launched while another one is still processing and have to execute callbacks. Ensure that we do not start a new syncAllModels till the last one has executed all callbacks
- Add a listener when the server is up. Sets to Error the Import Entries that where being processing when the server went down
-Set correctly copyright date and set error message to give more info to the user

---
M src-db/database/sourcedata/AD_MODEL_OBJECT.xml
M web/org.openbravo.mobile.core/source/data/ob-requestrouter.js
M web/org.openbravo.mobile.core/source/model/ob-terminal-model.js
A src/org/openbravo/mobile/core/listener/SetErrorImportEntryArchiveListener.java
---
(0101187)
hgbot   
2017-12-21 16:30   
Repository: retail/backports/3.0RR17Q4/org.openbravo.retail.posterminal
Changeset: 0dfed8533d2b1cfcf3c37a12fd28046bab74c0e9
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Thu Dec 21 16:23:50 2017 +0100
URL: http://code.openbravo.com/retail/backports/3.0RR17Q4/org.openbravo.retail.posterminal/rev/0dfed8533d2b1cfcf3c37a12fd28046bab74c0e9 [^]

Fixed issue 0037327: [SynchronizeMode] Wrong behaviour when server/connection goes down while synchronizing a message

- Change the way we delete the order to ensure that the order is fully removed (also in the local database)
- If checking request fails, wait until it responds, we need to know the status of the message
- Add again rebuildCashup because it was done inside deleteOrder function. Now we do not use deleteOrder and we need to do rebuild explicitly

---
M web/org.openbravo.retail.posterminal/js/login/model/login-model.js
---