Openbravo Issue Tracking System - Modules
View Issue Details
0042541ModulesExternal Data Integrationpublic2019-12-12 18:542020-05-08 17:51
caristu 
caristu 
highminorhave not tried
closedfixed 
5
 
 
AugustoMauch
0042541: EDL request status can be not updated properly under some circumnstances
EDL request status can be not updated properly under some circumnstances: for example if during the flush done for the management of a failed item, an OBException is thrown, in that case the update of the EDL request status fails.
1- Install the https://code.openbravo.com/erp/pmods/org.openbravo.externaldata.integration.examples [^] module
2- Apply the attached failureEH.diff patch. It contains an event handler that will force a failure during the management of a processed batch
3- Execute the Import UOM asynchronously process
4- Note that the first batch (request line) is processed correctly, but the second one remains in Initial state but it has already been executed and it has failed. It should be in error status and with the error information included. Also note that the EDL request status is not updated properly.
See attached patch (handleError.diff)
No tags attached.
causes defect 0044119 closed caristu Output Content Not Saved In case of error 
diff handleError.diff (2,477) 2019-12-12 18:54
https://issues.openbravo.com/file_download.php?file_id=13667&type=bug
diff failureEH.diff (1,511) 2020-02-12 10:18
https://issues.openbravo.com/file_download.php?file_id=14023&type=bug
Issue History
2019-12-12 18:54caristuNew Issue
2019-12-12 18:54caristuAssigned To => caristu
2019-12-12 18:54caristuFile Added: handleError.diff
2020-02-11 19:34caristuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=20345#r20345
2020-02-11 19:34caristuFile Added: failureEH.diff
2020-02-12 10:16caristuNote Added: 0117678
2020-02-12 10:17caristuStatusnew => acknowledged
2020-02-12 10:17caristuStatusacknowledged => scheduled
2020-02-12 10:18caristuFile Deleted: failureEH.diff
2020-02-12 10:18caristuFile Added: failureEH.diff
2020-02-12 10:19caristuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=20357#r20357
2020-02-12 16:03caristuReview Assigned To => AugustoMauch
2020-05-07 15:51martinsdanIssue Monitored: martinsdan
2020-05-08 17:51hgbotCheckin
2020-05-08 17:51hgbotNote Added: 0119716
2020-05-08 17:51hgbotStatusscheduled => resolved
2020-05-08 17:51hgbotResolutionopen => fixed
2020-05-08 17:51hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.externaldata.integration/rev/add838f2fe9e5d59a7eb7ec4007dc4229554717c [^]
2020-05-08 17:51caristuStatusresolved => closed
2020-05-20 13:13caristuRelationship addedcauses 0044119

Notes
(0117678)
caristu   
2020-02-12 10:16   
MR: https://gitlab.com/openbravo/product/pmods/org.openbravo.externaldata.integration/-/merge_requests/1 [^]
(0119716)
hgbot   
2020-05-08 17:51   
Repository: erp/pmods/org.openbravo.externaldata.integration
Changeset: add838f2fe9e5d59a7eb7ec4007dc4229554717c
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Wed Feb 12 09:53:43 2020 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.externaldata.integration/rev/add838f2fe9e5d59a7eb7ec4007dc4229554717c [^]

fixes BUG-42541: EDL request status not updated under some circumnstances

  This changeset contains several important changes:

  - We are not just doing rollback of the connection but also closing
the Hibernate session to ensure that we start from a "clean" state
before setting the EDL reques status to error.

  - OBExceptions are handled in the same way as the rest of exceptions,
otherwise the EDL request state can not be updated properly when such
kind of exceptions are thrown.

  - As we are closing the Hibernate session in case of error, we now
need to reload the EDL request (using get) to have it into the session.

  - Removing unneeded OBDal.getInstance().save(requestLine), because
requestLine is not a new BOB.

  - Removing unneeded OBDal.getInstance().flush(), because it is invoked
below within the doCommit() method.

---
M src/org/openbravo/externaldata/integration/process/ProcessRequest.java
---