Openbravo Issue Tracking System - Retail Modules
View Issue Details
0049438Retail ModulesWeb POSpublic2022-05-30 15:052023-06-14 13:51
gorkaion 
ranjith_qualiantech_com 
highmajoralways
closedfixed 
5
 
RR22Q3 
No
0049438: PostImportEntry is not being executed in some escenarios with multiple documents
When a POS Message contain multiple documents on the data array. If one of them fails and go to the EWI window the PostImportEntry is never executed for the documents that are properly processed.

This is a big problem for implementers that trigger external synchronization processes when a document is created in backend.

The problem is caused by the fact that as there is one document failing the exec is returning a failure so the PostImportEntry hook execution is executed.

When the EWI is fixed the process is calling the hook but this is only run for the document that originally failed.

The expected flow was broken with the fix of issue 0036037. Originally it was always executed regardless the result of the import entry process.

In my opinion this should be the expected behavior (always executed) and the implementer should check if the import entry was properly processed or not. With current approach is not possible to implement a postprocess hook to trigger a warning or rollback process on failures.
1. Generate a message with 2 documents in the data array.
2. Make one of the document to fail.
3. Notice that the hook is not executed.
4. Fix the EWI and check the hook is executed but on a new import entry that only contain the document that failed.
* hook to be executed regardless of the result.
* add more information to implementer with the result of the process to easily determine if a document on the data array has been processed or not. Perhaps by modifying the json in the import entry?
NOR
related to design defect 0041109 new Triage Platform Base Openbravo ERP Improvements in ImportEntryPreProcessor/ImportEntryPostProcessor 
caused by defect 0036037 closed migueldejuana Retail Modules PostImportEntry hook is getting executed even if the record goes to Errors While Importing window 
related to defect 0052739 closed ranjith_qualiantech_com Retail Modules Issue when the role in the POS does not have access to the C_IMPORT_ENTRY 
causes defect 0053973 closed Rajesh_18 Retail Modules Data Import Entries record related to cashup is empty if the cashup goes to Errors While Importing POS Data 
Issue History
2022-05-30 15:05gorkaionNew Issue
2022-05-30 15:05gorkaionAssigned To => Retail
2022-05-30 15:05gorkaionTriggers an Emergency Pack => No
2022-05-30 15:05gorkaionRelationship addedcaused by 0036037
2022-05-30 15:05gorkaionRelationship addedrelated to 0041109
2022-06-08 15:03ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2022-06-08 15:03ranjith_qualiantech_comStatusnew => scheduled
2022-06-20 12:43hgbotNote Added: 0138554
2022-06-20 12:43hgbotNote Added: 0138555
2022-06-23 09:01hgbotResolutionopen => fixed
2022-06-23 09:01hgbotStatusscheduled => closed
2022-06-23 09:01hgbotFixed in Version => RR22Q3
2022-06-23 09:01hgbotNote Added: 0138674
2022-06-23 09:01hgbotNote Added: 0138675
2022-06-23 09:01hgbotNote Added: 0138676
2022-06-23 09:01hgbotNote Added: 0138677
2022-07-08 09:38rafarodaTag Attached: NOR
2023-06-14 13:44ngarciaRelationship addedcauses 0052742
2023-06-14 13:50ngarciaRelationship addedcauses 0052739
2023-06-14 13:51ngarciaRelationship deletedcauses 0052742
2023-06-15 09:55ngarciaRelationship replacedrelated to 0052739
2023-12-08 08:43Rajesh_18Relationship addedcauses 0053973

Notes
(0138554)
hgbot   
2022-06-20 12:43   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/381 [^]
(0138555)
hgbot   
2022-06-20 12:43   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/828 [^]
(0138674)
hgbot   
2022-06-23 09:01   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core [^]
Changeset: 0ecf130a8964e82fcc887b5d45a7301b97289cf4
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 20-06-2022 15:53:12
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/commit/0ecf130a8964e82fcc887b5d45a7301b97289cf4 [^]

Fixed ISSUE-49438: ImportEntryPostProcessor should be invoked only for processed records
* When processing the record, if error occurs then
  Duplicate Import Entry should be created with processedRecords in jsonInfo.
  Above Import Entry should be used for ImportEntryPostProcessor implementation

---
M src/org/openbravo/mobile/core/process/DataSynchronizationProcess.java
M src/org/openbravo/mobile/core/process/MobileImportEntryProcessorRunnable.java
---
(0138675)
hgbot   
2022-06-23 09:01   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/381 [^]
(0138676)
hgbot   
2022-06-23 09:01   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: 1225b7157174a3944b9f7e80beb17ba7cb2b5d34
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 23-06-2022 07:01:34
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/1225b7157174a3944b9f7e80beb17ba7cb2b5d34 [^]

Related to ISSUE-49438: ImportEntryPostProcessor should be invoked only for processed records

---
M src/org/openbravo/retail/posterminal/SaveDataActionHandler.java
---
(0138677)
hgbot   
2022-06-23 09:01   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/828 [^]