Openbravo Issue Tracking System - Retail Modules
View Issue Details
0034943Retail ModulesStoreServerpublic2017-01-13 10:212017-01-25 09:51
mtaal 
mtaal 
normalminorhave not tried
closedfixed 
5
 
RR17Q2RR17Q2 
Sandrahuguet
No
0034943: Implement on-demand replication of process run from store to central server
The ad_process_run table is a table which is frequently updated and also replicated from store to central. This means that there is often data to replicate from store to central. With 300 stores this puts a high load on central and also makes it more difficult for a store to go online as there is data to sync also when the store is not allowing webpos to work.

Also the ad_process_run only needs to be present in central for analyses purposes and nothing more.
Install multi-server
- add column to ad_process_run table: sync_to_central, default N
- give ad_process_run special router which ignores all records which have sync_to_central to N
- add a button in mobile server window to replicate 1000 records from store to central for selected mobile server
- when button is pressed call store server with a webservice
- in the webservice pick the last updated 1000 records with sync_to_central to N and set the column to Y
- the 1000 records are replicated
- by pressing the button multiple times the user can download 1000 records more everytime.
No tags attached.
Issue History
2017-01-13 10:21mtaalNew Issue
2017-01-13 10:21mtaalAssigned To => mtaal
2017-01-13 10:21mtaalTriggers an Emergency Pack => No
2017-01-13 13:59AugustoMauchAssigned Tomtaal => AugustoMauch
2017-01-13 14:06hgbotCheckin
2017-01-13 14:06hgbotNote Added: 0093537
2017-01-13 14:08AugustoMauchAssigned ToAugustoMauch => mtaal
2017-01-16 00:19hgbotCheckin
2017-01-16 00:19hgbotNote Added: 0093566
2017-01-16 00:19hgbotStatusnew => resolved
2017-01-16 00:19hgbotResolutionopen => fixed
2017-01-16 00:19hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/65b2d94b5251c1aa1bd815b0d6da75e68ba3752c [^]
2017-01-18 16:33mtaalReview Assigned To => Sandrahuguet
2017-01-25 09:31hgbotCheckin
2017-01-25 09:31hgbotNote Added: 0093807
2017-01-25 09:51SandrahuguetNote Added: 0093809
2017-01-25 09:51SandrahuguetStatusresolved => closed
2017-01-25 09:51SandrahuguetFixed in Version => RR17Q2

Notes
(0093537)
hgbot   
2017-01-13 14:06   
Repository: erp/pmods/org.openbravo.retail.storeserver.synchronization
Changeset: 6dcfe3b563be00c7879d0bbf1f6c15e6adc31330
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Fri Jan 13 14:03:46 2017 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/6dcfe3b563be00c7879d0bbf1f6c15e6adc31330 [^]

Related with issue 34943:Only process runs with synch_to_central='y' are synced

A new column has been added to ad_process_run: em_obstsyn_sync_to_central. This column determines if a process run should be synchronized from a store server to the central server.

A new router has been added: ProcessRunRouter. This router will only synchronize the entries of ad_process_run whose em_obstsyn_sync_to_central value is 'Y'.

---
M src-db/database/model/modifiedTables/AD_PROCESS_RUN.xml
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_ELEMENT.xml
M src-db/database/sourcedata/STRSYNC_CUSTOM_ROUTER.xml
M src-db/database/sourcedata/STRSYNC_SYNCHRONIZEDTABLE.xml
A src/org/openbravo/retail/storeserver/synchronization/router/ProcessRunRouter.java
---
(0093566)
hgbot   
2017-01-16 00:19   
Repository: erp/pmods/org.openbravo.retail.storeserver.synchronization
Changeset: 65b2d94b5251c1aa1bd815b0d6da75e68ba3752c
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Mon Jan 16 00:19:03 2017 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/65b2d94b5251c1aa1bd815b0d6da75e68ba3752c [^]

Fixes issue 34943: Implement on-demand replication of process run from store to central server
Add button to send request to store server to set process run flag so that it gets replicated.
Add new window to show the server process runs directly in the roottab

---
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_MENU.xml
M src-db/database/sourcedata/AD_TAB.xml
M src-db/database/sourcedata/AD_TREENODE.xml
M src-db/database/sourcedata/AD_WINDOW.xml
M src-db/database/sourcedata/OBUIAPP_PROCESS.xml
A src-db/database/model/modifiedTables/OBMOBC_SERVER_DEFINITION.xml
A src/org/openbravo/retail/storeserver/synchronization/process/MobileServerFlagProcessRunToReplicate.java
A src/org/openbravo/retail/storeserver/synchronization/process/MobileServerRetrieveProcessRun.java
---
(0093807)
hgbot   
2017-01-25 09:31   
Repository: erp/pmods/org.openbravo.retail.storeserver.synchronization
Changeset: 750baf3514b3eec96cf708f1e84a19c2fb5bea1d
Author: Sandra Huguet <sandra.huguet <at> openbravo.com>
Date: Wed Jan 25 09:31:22 2017 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/750baf3514b3eec96cf708f1e84a19c2fb5bea1d [^]

related to issue 34943 applied code review

---
M src/org/openbravo/retail/storeserver/synchronization/router/ProcessRunRouter.java
---
(0093809)
Sandrahuguet   
2017-01-25 09:51   
reviewed and tested