Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0034287
TypeCategorySeverityReproducibilityDate SubmittedLast Update
feature request[Retail Modules] Web POSmajoralways2016-10-24 18:482020-04-14 15:10
Reportereduardo_ArgalView Statuspublic 
Assigned Toeduardo_Argal 
PrioritynormalResolutionopenFixed in Version
StatusnewFix in branchFixed in SCM revision85e0af60e83b
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tomtaal
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0034287: Entity vs Import Qualifier

DescriptionHavning a process with a service defined as Transaction (so it does use queues, import entries)
As you know for this processes we define:
- An entity:
@DataSynchronization(entity = "XXX")
- An import qualifier:
  protected String getImportQualifier() {
    return "YYY";
  }
We were always assuming that this XXX = YYY, but this is not correct. For example in the case of Cancel Layaway the entity behind is a Layaway (Order) but the import qualifier should be the process: OBPOS_CancelLayaway (for example). We noticed this due to an error that now is thrown due to the validation you added for synchronized mode (afterReturnFromCentral). This validation is querying to retrieve the record in the other server (check DS). As we were using process name as entity, process was failing when trying to get object behind 'id' for non existing entity (OBPOS_CancelLayaway).
This took me to change entity = Order, importQaulifier = OBPOS_CancelLayaway. and this worked fine. But as well a new problem raised.
Let me explain, when preference for synchronized is not there (equals 'N') and an error occurs, an import error is raised and there the API is using entity for the importdatatype. That's a problem because I think it should map to the importQualifier (so that process can be run again when fixing error)
Steps To ReproduceCreate a Layaway in an env with synchronized preference equals Y.
Cancel it using cancel Layaway process.
System fails due to wrong entity (OBPOS_CancelLayaway).
Proposed SolutionFind patches attached
TagsNo tags attached.
Attached Filesdiff file icon posterminal.diff [^] (4,258 bytes) 2016-10-24 18:48 [Show Content]
diff file icon mobile.core (1).diff [^] (2,282 bytes) 2016-10-24 18:49 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0090930)
hgbot (developer)
2016-10-26 17:48

Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 85e0af60e83bb6b3ec99ac157aa778d3dfb0218a
Author: Eduardo Argal Guibert <eduardo.argal <at> openbravo.com>
Date: Wed Oct 26 17:48:35 2016 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/85e0af60e83bb6b3ec99ac157aa778d3dfb0218a [^]

Fixes issue 34287. API change in handle error (importQualifier vs entity)

---
M src/org/openbravo/mobile/core/process/DataSynchronizationErrorHandler.java
M src/org/openbravo/mobile/core/process/DataSynchronizationProcess.java
---
(0090931)
hgbot (developer)
2016-10-26 17:49

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: a960316c234272a2c3dcb42fda40b8886e146c61
Author: Eduardo Argal Guibert <eduardo.argal <at> openbravo.com>
Date: Wed Oct 26 17:49:22 2016 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/a960316c234272a2c3dcb42fda40b8886e146c61 [^]

Related to issue 34287. API change in handle error (importQualifier vs entity)

---
M src/org/openbravo/retail/posterminal/ExternalOrderLoaderErrorHandler.java
M src/org/openbravo/retail/posterminal/POSDataSynchronizationErrorHandler.java
---
(0091164)
hgbot (developer)
2016-11-04 10:27

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 83f96a506db7ce8d3d6dc50c627fc4d9ab29d4e8
Author: Eduardo Argal Guibert <eduardo.argal <at> openbravo.com>
Date: Fri Nov 04 10:27:34 2016 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/83f96a506db7ce8d3d6dc50c627fc4d9ab29d4e8 [^]

Related to issue 34287: Change in CancellayawayLoader

---
M src/org/openbravo/retail/posterminal/CancelLayawayLoader.java
---
(0091538)
mtaal (manager)
2016-11-15 10:25

Subclasses of DataSynchronizationProcess have an annotation to tell which entity is handled by the DataSynchronizationProcess (e.g. [1]). The value in the annotation must be a real entity name becauses the annotation is used by DataSynchronizationProcess [5] to find the entity covered by the DataSynchronizationProcess. If an entity is not found then several parts of the code get into an error [4].

Eduardo's team had some issues with it [2] and set the CancelLayawayLoader entity annotation to Order, after discussing with me. But in hinsight this gives issues as there are now 2 DataSynchronizationProcess with the same annotation ([1] and [3]). This gives problems when processing any errors [6] as there a unique entity name is expected to find the implementing DataSynchronizationProcess.

So my take:
- the @DataSynchronization(entity="...") must be unique and may contain non-entity names
- if the annotation has a non-entity name then the implementing class must override the getEntity method to return the real entity
- when creating the error handler the value of the annotation-entity name should be used.

Very confusing topic... Let me know what you think.

gr. Martin

[1]
@DataSynchronization(entity = "Order")
public class OrderLoader extends POSDataSynchronizationProcess implements
    DataSynchronizationImportProcess {

[2]
https://issues.openbravo.com/view.php?id=34287 [^]

[3]
@DataSynchronization(entity = "Order")
public class CancelLayawayLoader extends POSDataSynchronizationProcess implements
    DataSynchronizationImportProcess {

[4]
https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/file/0a4ebceba039/src/org/openbravo/mobile/core/process/DataSynchronizationProcess.java#l237 [^]
https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/file/0a4ebceba039/src/org/openbravo/mobile/core/servercontroller/SynchronizedServerProcessCaller.java#l141 [^]

[5]
https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/file/0a4ebceba039/src/org/openbravo/mobile/core/process/DataSynchronizationProcess.java#l390 [^]

[6]
https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/file/505ee341ebe9/src/org/openbravo/retail/posterminal/SaveDataActionHandler.java#l71 [^]
https://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/file/dc57a9fb7c64/src/org/openbravo/retail/storeserver/synchronization/process/ProcessPOSErrors.java#l128 [^]
(0093074)
hgbot (developer)
2016-12-30 13:37

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: c362b688c27f58aa66af054ec233f8e31b921277
Author: Guillermo Alvarez de Eulate <guillermo.alvarez <at> openbravo.com>
Date: Fri Dec 30 10:59:13 2016 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/c362b688c27f58aa66af054ec233f8e31b921277 [^]

Related to issue 34287: Backed out changeset a960316c2342 because the release is going to be closed and this change was not approved

---
M src/org/openbravo/retail/posterminal/ExternalOrderLoaderErrorHandler.java
M src/org/openbravo/retail/posterminal/POSDataSynchronizationErrorHandler.java
---
(0093076)
hgbot (developer)
2016-12-30 13:37

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 6d62564df8bba74d6b33cb1bdb1a5ba88c89b85f
Author: Guillermo Alvarez de Eulate <guillermo.alvarez <at> openbravo.com>
Date: Fri Dec 30 11:00:19 2016 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/6d62564df8bba74d6b33cb1bdb1a5ba88c89b85f [^]

Related to issue 34287: Backed out changeset 83f96a506db7 because the release is going to be closed and this change was not approved

---
M src/org/openbravo/retail/posterminal/CancelLayawayLoader.java
---
(0093078)
hgbot (developer)
2016-12-30 13:37

Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 49d79b8bed6d5b2eef11195b193a87963a9cad3e
Author: Guillermo Alvarez de Eulate <guillermo.alvarez <at> openbravo.com>
Date: Fri Dec 30 10:57:55 2016 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/49d79b8bed6d5b2eef11195b193a87963a9cad3e [^]

Related to issue 34287: Backed out changeset 85e0af60e83b because the release is going to be closed and this change was not approved

---
M src/org/openbravo/mobile/core/process/DataSynchronizationErrorHandler.java
M src/org/openbravo/mobile/core/process/DataSynchronizationProcess.java
---

- Issue History
Date Modified Username Field Change
2016-10-24 18:48 eduardo_Argal New Issue
2016-10-24 18:48 eduardo_Argal Assigned To => adrianromero
2016-10-24 18:48 eduardo_Argal File Added: posterminal.diff
2016-10-24 18:49 eduardo_Argal File Added: mobile.core (1).diff
2016-10-24 18:49 eduardo_Argal Assigned To adrianromero => eduardo_Argal
2016-10-26 17:48 hgbot Checkin
2016-10-26 17:48 hgbot Note Added: 0090930
2016-10-26 17:48 hgbot Status new => resolved
2016-10-26 17:48 hgbot Resolution open => fixed
2016-10-26 17:48 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/85e0af60e83bb6b3ec99ac157aa778d3dfb0218a [^]
2016-10-26 17:49 hgbot Checkin
2016-10-26 17:49 hgbot Note Added: 0090931
2016-11-04 10:27 hgbot Checkin
2016-11-04 10:27 hgbot Note Added: 0091164
2016-11-07 11:49 mtaal Review Assigned To => mtaal
2016-11-15 10:25 mtaal Note Added: 0091538
2016-11-15 10:25 mtaal Status resolved => new
2016-11-15 10:25 mtaal Resolution fixed => open
2016-12-30 13:37 hgbot Checkin
2016-12-30 13:37 hgbot Note Added: 0093074
2016-12-30 13:37 hgbot Checkin
2016-12-30 13:37 hgbot Note Added: 0093076
2016-12-30 13:37 hgbot Checkin
2016-12-30 13:37 hgbot Note Added: 0093078
2020-04-14 15:10 marvintm Project Java Client POS => Retail Modules
2020-04-14 15:10 marvintm Triggers an Emergency Pack => No
2020-04-14 15:10 marvintm Category 01 - General => Web POS


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker