Openbravo Issue Tracking System - Retail Modules
View Issue Details
0033107Retail ModulesStoreServerpublic2016-06-01 18:302016-10-24 09:17
plujan 
mtaal 
normalmajorhave not tried
closedfixed 
5
pi 
 
migueldejuana
No
0033107: [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.
related to design defect 0033270RR16Q4 closed mtaal Improve offline notification to user when using webpos in multi-server with stopped store server 
depends on backport 0034279RR16Q3.3 closed mtaal [StoreServer] When the store server is not working the webPOS does not work 
png CentralServerLogin.png (24,103) 2016-06-01 18:30
https://issues.openbravo.com/file_download.php?file_id=9469&type=bug
png
Issue History
2016-06-01 18:30plujanNew Issue
2016-06-01 18:30plujanAssigned To => mtaal
2016-06-01 18:30plujanFile Added: CentralServerLogin.png
2016-06-01 18:30plujanTriggers an Emergency Pack => No
2016-06-15 11:56mtaalRelationship addedrelated to 0033270
2016-07-11 16:26mtaalCategoryWeb POS => StoreServer Infrastructure
2016-07-12 16:13gorka_gilCategoryStoreServer Infrastructure => StoreServer
2016-07-14 22:30hgbotCheckin
2016-07-14 22:30hgbotNote Added: 0088503
2016-07-14 22:30hgbotStatusnew => resolved
2016-07-14 22:30hgbotResolutionopen => fixed
2016-07-14 22:30hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/cec11c87a5462ac355481842d4f0c061832cbe09 [^]
2016-07-14 22:35hgbotCheckin
2016-07-14 22:35hgbotNote Added: 0088504
2016-08-01 13:02mtaalReview Assigned To => migueldejuana
2016-08-05 16:07dmitry_mezentsevNote Added: 0088854
2016-08-17 08:00migueldejuanaNote Added: 0089164
2016-08-17 08:00migueldejuanaStatusresolved => closed
2016-10-24 09:16mtaalNote Added: 0090802
2016-10-24 09:16mtaalStatusclosed => new
2016-10-24 09:16mtaalResolutionfixed => open
2016-10-24 09:16mtaalStatusnew => scheduled
2016-10-24 09:17mtaalStatusscheduled => resolved
2016-10-24 09:17mtaalResolutionopen => fixed
2016-10-24 09:17mtaalStatusresolved => closed

Notes
(0088503)
hgbot   
2016-07-14 22:30   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: cec11c87a5462ac355481842d4f0c061832cbe09
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Thu Jul 14 22:29:48 2016 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/cec11c87a5462ac355481842d4f0c061832cbe09 [^]

fixes issue 33107: [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
---
(0088504)
hgbot   
2016-07-14 22:35   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: be0904349eb7b4e768b91957507e101a467f37a2
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Thu Jul 14 22:34:57 2016 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/be0904349eb7b4e768b91957507e101a467f37a2 [^]

related to issue 33107: [StoreServer] When the store server is not working the webPOS does not work
Changes in posterminal to allow offline login in multi-server environments, defensive coding change

POSDataSynchronizationErrorHandler: defensive coding, prevent NPE if error entry was already removed
SaveDataActionHandler: make method public so it can be called by error handler in a dependant module
login-model: prevent showing manifest error popup in case of multi-server environment

---
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
---
(0088854)
dmitry_mezentsev   
2016-08-05 16:07   
Not closed for 22 days!!
(0089164)
migueldejuana   
2016-08-17 08:00   
Tested and reviewed
(0090802)
mtaal   
2016-10-24 09:16   
re-opened to schedule backport to q3.3