Openbravo Issue Tracking System - Retail Modules
View Issue Details
0034279Retail ModulesStoreServerpublic2016-06-01 18:302016-11-16 13:20
plujan 
mtaal 
normalmajorhave not tried
closedfixed 
5
pi 
RR16Q3.3 
migueldejuana
No
0034279: [StoreServer] When the store server is not working the webPOS does not work
Making the store server unavailable for the webPOS to connect should make it to try to connect to the central server, but this does not happen and the message shown is as the webPOS trying to work with local (websql) database, which is not possible since remote data is active
Environment setup: A store server, A central sever and a webPOS terminal. Remote data enabled (no webSQL off line mode)

1. Login in webPOS as vallblanca user
2. Create a ticket to verify connection is working as expected
3. Verify in the Store Server back office that the ticket has been created
4. Using the browser console, check the RequestRouter.servers list. It has two entries, one for the Store Server and one for the Central Server.
5. Using the ssh console at the store server, stop Tomcat
6. Logout in the webPOS
7. Try to log in. A message is shown (see attached screenshot). This message is shown when a webSQL off line mode is attempted on a Remote Data environment.
8. Using the browser console, check the RequestRouter.servers list. It has only a default entry
No tags attached.
blocks defect 0033107 closed mtaal [StoreServer] When the store server is not working the webPOS does not work 
Issue History
2016-10-24 09:16mtaalTypedefect => backport
2016-10-24 09:16mtaalTarget Version => RR16Q3.3
2016-10-24 11:22hgbotCheckin
2016-10-24 11:22hgbotNote Added: 0090810
2016-10-24 11:22hgbotStatusscheduled => resolved
2016-10-24 11:22hgbotResolutionopen => fixed
2016-10-24 11:22hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/cec11c87a5462ac355481842d4f0c061832cbe09 [^] => http://code.openbravo.com/retail/backports/3.0RR16Q3.3/org.openbravo.mobile.core/rev/aeea066b84fa7b4ddeea62d84dfbce29f898efa5 [^]
2016-10-24 11:23hgbotCheckin
2016-10-24 11:23hgbotNote Added: 0090811
2016-11-16 13:20migueldejuanaNote Added: 0091602
2016-11-16 13:20migueldejuanaStatusresolved => closed

Notes
(0090810)
hgbot   
2016-10-24 11:22   
Repository: retail/backports/3.0RR16Q3.3/org.openbravo.mobile.core
Changeset: aeea066b84fa7b4ddeea62d84dfbce29f898efa5
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Mon Oct 24 11:21:41 2016 +0200
URL: http://code.openbravo.com/retail/backports/3.0RR16Q3.3/org.openbravo.mobile.core/rev/aeea066b84fa7b4ddeea62d84dfbce29f898efa5 [^]

fixes issue 34279: [StoreServer] When the store server is not working the webPOS does not work
Login was failing because manifest error was thrown, in case of multi-server then the manifest error may still occur but can be ignored. Also in case of offline the initialization of servers/services was not done correctly, this was repaired. Also offline/online concepts are different for single versus multi server environments. In case of multi-server the offline/online message is shown when there are messages to sync or not. In single server it is based on the connection status of the single server.

MobileServerRequestExecutor: store result of webservice call in local var for easier debugging
ob-requestrouter: distinguish how offline/online is notified in case of single and multi-server, change the initialization and prevent manifest error to support offline login when the store server is not available while the central server is available, some defensive coding, keep track of which is the current server
ob-terminal-model: also let the login request be done through the requestrouter layer
ob-utilities: only trigger offline after ping if there is one server

---
M src/org/openbravo/mobile/core/servercontroller/MobileServerRequestExecutor.java
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
---
(0090811)
hgbot   
2016-10-24 11:23   
Repository: retail/backports/3.0RR16Q3.3/org.openbravo.retail.posterminal
Changeset: eec22eac1fd918c6c50456cd67c466b18bef551b
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Mon Oct 24 11:23:05 2016 +0200
URL: http://code.openbravo.com/retail/backports/3.0RR16Q3.3/org.openbravo.retail.posterminal/rev/eec22eac1fd918c6c50456cd67c466b18bef551b [^]

Related to issue 34279: [StoreServer] When the store server is not working the webPOS does not work
Login was failing because manifest error was thrown, in case of multi-server then the manifest error may still occur but can be ignored. Also in case of offline the initialization of servers/services was not done correctly, this was repaired. Also offline/online concepts are different for single versus multi server environments. In case of multi-server the offline/online message is shown when there are messages to sync or not. In single server it is based on the connection status of the single server.

MobileServerRequestExecutor: store result of webservice call in local var for easier debugging
ob-requestrouter: distinguish how offline/online is notified in case of single and multi-server, change the initialization and prevent manifest error to support offline login when the store server is not available while the central server is available, some defensive coding, keep track of which is the current server
ob-terminal-model: also let the login request be done through the requestrouter layer
ob-utilities: only trigger offline after ping if there is one server

---
M src/org/openbravo/retail/posterminal/POSDataSynchronizationErrorHandler.java
M src/org/openbravo/retail/posterminal/SaveDataActionHandler.java
M web/org.openbravo.retail.posterminal/js/login/model/login-model.js
---
(0091602)
migueldejuana   
2016-11-16 13:20   
Reviewed