Openbravo Issue Tracking System - Retail Modules
View Issue Details
0032680Retail ModulesWeb POSpublic2016-04-15 15:412016-06-30 14:35
mtaal 
mtaal 
normalminorhave not tried
closedfixed 
5
 
RR16Q3 
migueldejuana
No
0032680: Retry several times when a request to a server fails before setting server as offline
When a server fails to respond to a request then currently it is put offline in webpos right away. It seems better to retry the request and after several (configurable) requests actually put the server offline.
Add a preference to control the number of retries
Also use this preference on the server
In the WebPOS client add retry logic so that a failover request is retried on the same server until the treshold is reached.

Same for transaction requests, there a message is retried, if a server has several failures on transaction message then put the server offline.

No tags attached.
related to defect 0032920 closed migueldejuana Web POS never comes back after it has gone offline 
Issue History
2016-04-15 15:41mtaalNew Issue
2016-04-15 15:41mtaalAssigned To => mtaal
2016-04-15 15:41mtaalTriggers an Emergency Pack => No
2016-04-19 08:49hgbotCheckin
2016-04-19 08:49hgbotNote Added: 0085727
2016-04-19 08:49hgbotStatusnew => resolved
2016-04-19 08:49hgbotResolutionopen => fixed
2016-04-19 08:49hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/cfeb56a7b027c77fc2c2463a46c4783d3c51ae11 [^]
2016-05-01 15:17mtaalReview Assigned To => migueldejuana
2016-05-16 00:54hgbotCheckin
2016-05-16 00:54hgbotNote Added: 0086451
2016-05-16 16:43migueldejuanaNote Added: 0086473
2016-05-16 16:43migueldejuanaStatusresolved => closed
2016-05-23 16:22migueldejuanaRelationship addedrelated to 0032920
2016-05-23 16:29migueldejuanaNote Added: 0086675
2016-05-23 16:29migueldejuanaStatusclosed => new
2016-05-23 16:29migueldejuanaResolutionfixed => open
2016-05-23 16:35migueldejuanaNote Edited: 0086675bug_revision_view_page.php?bugnote_id=0086675#r12212
2016-05-23 16:36migueldejuanaNote Edited: 0086675bug_revision_view_page.php?bugnote_id=0086675#r12213
2016-06-09 12:48mtaalNote Added: 0087114
2016-06-14 07:05hgbotCheckin
2016-06-14 07:05hgbotNote Added: 0087217
2016-06-14 07:05hgbotStatusnew => resolved
2016-06-14 07:05hgbotResolutionopen => fixed
2016-06-14 07:05hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/cfeb56a7b027c77fc2c2463a46c4783d3c51ae11 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/a17e34ee0e87cad1f90a8f677bb0e55c2581242c [^]
2016-06-14 10:23hgbotCheckin
2016-06-14 10:23hgbotNote Added: 0087234
2016-06-30 14:35migueldejuanaNote Added: 0088109
2016-06-30 14:35migueldejuanaStatusresolved => closed

Notes
(0085727)
hgbot   
2016-04-19 08:49   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: cfeb56a7b027c77fc2c2463a46c4783d3c51ae11
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Fri Apr 15 17:27:05 2016 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/cfeb56a7b027c77fc2c2463a46c4783d3c51ae11 [^]

Fixes issue 32680: Retry several times when a request to a server fails before setting server as offline
Added preference and retry logic in client, server side retry logic uses preference

---
M src-db/database/sourcedata/AD_REF_LIST.xml
M src/org/openbravo/mobile/core/servercontroller/MobileServerRequestExecutor.java
M src/org/openbravo/mobile/core/servercontroller/MobileServerUtils.java
M web/org.openbravo.mobile.core/source/data/ob-requestrouter.js
---
(0086451)
hgbot   
2016-05-16 00:54   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: be72c03425db39f19cd12f34e1b99fa34747123f
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Sun May 15 09:27:49 2016 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/be72c03425db39f19cd12f34e1b99fa34747123f [^]

Related to issue 32680: Retry several times when a request to a server fails before setting server as offline
Small change to if-then-else to make it more readable

---
M web/org.openbravo.mobile.core/source/data/ob-requestrouter.js
---
(0086473)
migueldejuana   
2016-05-16 16:43   
Tested and reviewed
(0086675)
migueldejuana   
2016-05-23 16:29   
(edited on: 2016-05-23 16:36)
It doesn't go to offline when sending an order without internet connection.

1.- Login
2.- Create and order without payment
3.- Lost internet connection
4.- Pay the order
5.- Not Synchronized red icon appears but we are still online and we remain online till next request or ping.

Retries with Transactions requests seems not working well.
If we put a breakpoint in Transaction fail method, we get an OrderLoader timeout every minute or so and it changes the server status from online to offline.

(0087114)
mtaal   
2016-06-09 12:48   
Another offline scenario which does not work:

The steps to reproduce are:
1. Log in Online mode
2. Log out
3. Disable connection
4. Log in Offline mode

The CashUpId is lost, so the first ticket can not be synchronized.
(0087217)
hgbot   
2016-06-14 07:05   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: a17e34ee0e87cad1f90a8f677bb0e55c2581242c
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Tue Jun 14 07:04:56 2016 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/a17e34ee0e87cad1f90a8f677bb0e55c2581242c [^]

Fixes issue 32680: Retry several times when a request to a server fails before setting server as offline
Prevent calling fail method in special case of enyo timeout, don't do retries if not needed or when offline.
Call success method also in case no server available, prevent one of the success methods to fail if called
in such a case.

---
M web/org.openbravo.mobile.core/source/data/ob-requestrouter.js
M web/org.openbravo.mobile.core/source/model/ob-terminal-model.js
M web/org.openbravo.mobile.core/source/utils/ob-utilities.js
---
(0087234)
hgbot   
2016-06-14 10:23   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: fe673e520daa5aa02f42bc871b9c3a4e15dca34c
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Tue Jun 14 10:23:07 2016 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/fe673e520daa5aa02f42bc871b9c3a4e15dca34c [^]

Related to issue 32680: Retry several times when a request to a server fails before setting server as offline
Beautify source

---
M web/org.openbravo.mobile.core/source/model/ob-terminal-model.js
---
(0088109)
migueldejuana   
2016-06-30 14:35   
Tested and reviewed