Openbravo Issue Tracking System - Retail Modules
View Issue Details
0034666Retail ModulesStoreServerpublic2016-12-01 14:202016-12-27 10:53
mtaal 
mtaal 
normalminorhave not tried
closedfixed 
5
 
RR17Q1 
AugustoMauch
No
No
0034666: Transition to online: infinite loop through offline-->transition-->offline when error during synchronization
When a failure occurs during transition to online or when there are synchronization or other errors then the system will continuously try to go online, fail, goto offline and then again try to go online etc. During transition to online the terminals can't work.


Install multi-server
Create a synchronization error from central to store
Stop central
let the store go offline
Start central
store will go into infinite loop through offline-transitiontoonline states

Proposal:
- add a preference: 'Transition-to-online fail retry time'. This preference controls how much time to wait to retry transition to online after a failure
- The new preference is used when transition to online fails for whatever reason. In this case existing 'timing' preferences/configuration to ping central server and try to transition to online will not be used.
- The default value of the new preference will be one hour (if the preference is not set).
No tags attached.
Issue History
2016-12-01 14:20mtaalNew Issue
2016-12-01 14:20mtaalAssigned To => mtaal
2016-12-01 14:20mtaalOBNetwork customer => No
2016-12-01 14:20mtaalTriggers an Emergency Pack => No
2016-12-03 12:42hgbotCheckin
2016-12-03 12:42hgbotNote Added: 0092071
2016-12-03 12:42hgbotCheckin
2016-12-03 12:42hgbotNote Added: 0092072
2016-12-03 12:42hgbotStatusnew => resolved
2016-12-03 12:42hgbotResolutionopen => fixed
2016-12-03 12:42hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/a1cb6b5c214390706b289e389927f355f11199ad [^]
2016-12-04 22:12mtaalNote Added: 0092077
2016-12-04 22:12mtaalReview Assigned To => AugustoMauch
2016-12-07 18:00AugustoMauchNote Added: 0092202
2016-12-07 18:00AugustoMauchStatusresolved => new
2016-12-07 18:00AugustoMauchResolutionfixed => open
2016-12-08 08:35hgbotCheckin
2016-12-08 08:35hgbotNote Added: 0092207
2016-12-08 08:35hgbotStatusnew => resolved
2016-12-08 08:35hgbotResolutionopen => fixed
2016-12-08 08:35hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/a1cb6b5c214390706b289e389927f355f11199ad [^] => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/05f67e25ac5a85a4af82febac6704e38a294a4f8 [^]
2016-12-27 10:52hgbotCheckin
2016-12-27 10:52hgbotNote Added: 0093012
2016-12-27 10:53AugustoMauchNote Added: 0093013
2016-12-27 10:53AugustoMauchStatusresolved => closed

Notes
(0092071)
hgbot   
2016-12-03 12:42   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 7b207d1082e0fff66fcde590e997a4c02d3f5b10
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Sat Dec 03 12:40:34 2016 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/7b207d1082e0fff66fcde590e997a4c02d3f5b10 [^]

Related to issue 34666: Transition to online: infinite loop through offline-->transition-->offline
Add new preference property to define 'failed transition to offline' wait time. Add new button
to mobile server window to tell server to transition to online

---
M src-db/database/model/tables/OBMOBC_SERVER_DEFINITION.xml
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_ELEMENT.xml
M src-db/database/sourcedata/AD_FIELD.xml
M src-db/database/sourcedata/AD_REF_LIST.xml
A src-db/database/sourcedata/OBUIAPP_PROCESS.xml
---
(0092072)
hgbot   
2016-12-03 12:42   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: a1cb6b5c214390706b289e389927f355f11199ad
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Sat Dec 03 12:41:47 2016 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/a1cb6b5c214390706b289e389927f355f11199ad [^]

Fixes issue 34666: Transition to online: infinite loop through offline-->transition-->offline
Use new preference to wait with transition to online after failure, implement webservice to
allow an administrator to tell the server to go online.

- MobileServerSendTransitionToOnline: caller/process to call other server to transition to online
- ForceTransitionToOnline: webservice which can be called to force transition to online
- MobileServerController: add wait if transition to online fails, add methods to force transition to online

---
M src/org/openbravo/mobile/core/servercontroller/MobileServerController.java
A src/org/openbravo/mobile/core/servercontroller/ForceTransitionToOnline.java
A src/org/openbravo/mobile/core/servercontroller/MobileServerSendTransitionToOnline.java
---
(0092077)
mtaal   
2016-12-04 22:12   
Documented here:
http://wiki.openbravo.com/wiki/Store_Server_Online_and_Offline_Concepts#Transitioning_Triggers_-_Send_Transition_to_Online [^]

See preference described here:
http://wiki.openbravo.com/wiki/Store_and_Multi_Server_Preferences#Behavioral_Preferences [^]
(0092202)
AugustoMauch   
2016-12-07 18:00   
This method does not have an access modifier [1]. This [2] does not seem the best way to call a method, could just 'this' be used instead?

[1] https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/a1cb6b5c214390706b289e389927f355f11199ad#l2.45 [^]
[2] https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/a1cb6b5c214390706b289e389927f355f11199ad#l2.56 [^]
(0092207)
hgbot   
2016-12-08 08:35   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 05f67e25ac5a85a4af82febac6704e38a294a4f8
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Thu Dec 08 08:31:40 2016 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/05f67e25ac5a85a4af82febac6704e38a294a4f8 [^]

Fixes issue 34666: Transition to online: infinite loop through offline-->transition-->offline when error during synchronization
Solves code review comments

---
M src/org/openbravo/mobile/core/servercontroller/MobileServerController.java
---
(0093012)
hgbot   
2016-12-27 10:52   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 61f2952b9254ed56a968315af87c87be7612b0a7
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Dec 27 10:52:19 2016 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/61f2952b9254ed56a968315af87c87be7612b0a7 [^]

Related with issue 34666: Removes small duplication and fixes format

---
M src/org/openbravo/mobile/core/servercontroller/MobileServerController.java
---
(0093013)
AugustoMauch   
2016-12-27 10:53   
Code reviewed and verified