Openbravo Issue Tracking System - Retail Modules
View Issue Details
0044565Retail ModulesNexo Implementationpublic2020-07-07 09:262020-08-05 12:37
jcbourgeois 
Retail 
normalmajoralways
closedfixed 
5
RR19Q3.3 
 
adrianromero
No
0044565: WebPOS - NEXO provider - After a logout, time needed to login is important
After a logout, when the cashier logins into WebPOS, the loading time is more important than the first login of the day.
The analysis of requests (via Chrome Dev tools) shows WebPOS is waiting for the response of Nexo (ACI EFT). That response takes around 10s. See screenshot enclosed.

However, we didn't face this long time at first login of the day because WebPOS doesn't wait for that response of Nexo and it's the right behavior to optimize WebPOS loading
Video for login (first start of WebPOS) : https://drive.google.com/file/d/18iMmjSRF1tdoVHqltwKU5YUiAO2mjEdW/view [^] [^]
=> It's quite quick

Video for logout - login : https://drive.google.com/file/d/1I8nuaPLKbR7S8A_bCS2TG3HXlhWJepcX/view [^] [^]
=> WebPOS is waiting for Nexo (ACI EFT) response
In case of logout / login operation, don't wait for the response of Nexo
Performance
depends on defect 0043333 closed rqueralta Retail Modules The login hook is not executed when login after a cashup 
png screenshot.png (201,481) 2020-07-07 09:26
https://issues.openbravo.com/file_download.php?file_id=14737&type=bug
png
Issue History
2020-07-07 09:26jcbourgeoisNew Issue
2020-07-07 09:26jcbourgeoisAssigned To => Retail
2020-07-07 09:26jcbourgeoisFile Added: screenshot.png
2020-07-07 09:26jcbourgeoisTriggers an Emergency Pack => No
2020-07-07 09:27jcbourgeoisRelationship addedblocks 0044299
2020-07-18 07:16guillermogilResolution time => 1595973600
2020-07-18 07:16guillermogilCategoryWeb POS Hardware Manager => Nexo Implementation
2020-08-04 09:28guillermogilTag Attached: Performance
2020-08-04 09:58adrianromeroNote Added: 0121780
2020-08-04 12:26adrianromeroRelationship addedrelated to 0044600
2020-08-04 13:58adrianromeroRelationship deletedrelated to 0044600
2020-08-04 13:58adrianromeroRelationship addeddepends on 0043333
2020-08-04 14:09adrianromeroReview Assigned To => adrianromero
2020-08-04 14:09adrianromeroNote Added: 0121803
2020-08-04 14:09adrianromeroStatusnew => closed
2020-08-04 14:09adrianromeroResolutionopen => fixed
2020-08-04 14:34adrianromeroNote Added: 0121806
2020-08-04 14:34adrianromeroStatusclosed => new
2020-08-04 14:34adrianromeroResolutionfixed => open
2020-08-04 14:34adrianromeroNote Deleted: 0121806
2020-08-04 14:35adrianromeroNote Added: 0121807
2020-08-05 12:21hgbotNote Added: 0121844
2020-08-05 12:24hgbotNote Added: 0121845
2020-08-05 12:24hgbotNote Added: 0121846
2020-08-05 12:37hgbotNote Added: 0121848
2020-08-05 12:37hgbotResolutionopen => fixed
2020-08-05 12:37hgbotStatusnew => closed
2020-08-05 12:37hgbotNote Added: 0121849
2020-08-05 12:37hgbotNote Added: 0121850

Notes
(0121780)
adrianromero   
2020-08-04 09:58   
The observed behaviour might be a side effect of the login hook used to initialize NEXO and/or other functionality attached to the login hook, that in one case the login process is not waiting for all functionality attached to the login hook to finish and in the other case it does wait.
(0121803)
adrianromero   
2020-08-04 14:09   
Due to issue 0043333 depending on the flow implemented in the login hook in sessions module, the rest of the functionality attached to the login hook is executed or not. In order to have a consistent behaviour, all patches in issue 0043333 must be applied.

About the performance of the initialization of NEXO implemented in the login hook. Almost all of the time is took by the device initializing and verifying all the applications installed needed to support all cards: VISA, MASTER, AMERICAN EXPRESS, ... This initialization process is also used to update the firmware of the device if needed. As explained by the provider this initialization can take up to two minutes, and it is required to wait until the end to complete the POS login.
(0121807)
adrianromero   
2020-08-04 14:35   
After discussing the topic internally, we are going to explore the possibility to execute the NEXO initialization process asynchronously. This way the initialization process will not block the login to finish but it might be not possible to process NEXO payments until the initialization process is finished.
(0121844)
hgbot   
2020-08-05 12:21   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.asyncpayprovider/-/merge_requests/1 [^]
(0121845)
hgbot   
2020-08-05 12:24   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.asyncpayprovider [^]
Changeset: a9fbe75a6c287fb0ada9cf659169d8afaf2b92f4
Author: Adrián Romero <adrian.romero@openbravo.com>
Date: 2020-08-05T12:17:25+02:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.asyncpayprovider/-/commit/a9fbe75a6c287fb0ada9cf659169d8afaf2b92f4 [^]

Related ISSUE-0044565: WebPOS - NEXO provider - After a logout, time needed to login is important
* Adds to base login and logout hooks the ability to be executed in a deferred way

---
A web/org.openbravo.retail.asyncpayprovider/source/hook/deferredhook.js
M src/org/openbravo/retail/asyncpayprovider/ASYComponentProvider.java
M web/org.openbravo.retail.asyncpayprovider/source/hook/loginhook.js
M web/org.openbravo.retail.asyncpayprovider/source/hook/logouthook.js
---
(0121846)
hgbot   
2020-08-05 12:24   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.asyncpayprovider/-/merge_requests/1 [^]
(0121848)
hgbot   
2020-08-05 12:37   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.nexoprovider/-/merge_requests/1 [^]
(0121849)
hgbot   
2020-08-05 12:37   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.nexoprovider [^]
Changeset: ba73a0be68fa0a8dde3fdb181e33bc4d49893abd
Author: Adrián Romero <adrian.romero@openbravo.com>
Date: 2020-08-05T12:24:09+02:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.nexoprovider/-/commit/ba73a0be68fa0a8dde3fdb181e33bc4d49893abd [^]

Fixes ISSUE-0044565: WebPOS - NEXO provider - After a logout, time needed to login is important
* Use deferredHook() to not to block the login and logout process

---
M web/org.openbravo.retail.nexoprovider/js/hook/loginhook.js
M web/org.openbravo.retail.nexoprovider/js/hook/logouthook.js
---
(0121850)
hgbot   
2020-08-05 12:37   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.nexoprovider/-/merge_requests/1 [^]