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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0042541
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Modules] External Data Integrationminorhave not tried2019-12-12 18:542020-05-08 17:51
ReportercaristuView Statuspublic 
Assigned Tocaristu 
PriorityhighResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revisionadd838f2fe9e
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Regression date
Regression introduced by commit
Regression level
Review Assigned ToAugustoMauch
Regression introduced in release
Summary

0042541: EDL request status can be not updated properly under some circumnstances

DescriptionEDL 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.
Steps To Reproduce1- 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.
Proposed SolutionSee attached patch (handleError.diff)
TagsNo tags attached.
Attached Filesdiff file icon handleError.diff [^] (2,477 bytes) 2019-12-12 18:54 [Show Content]
diff file icon failureEH.diff [^] (1,511 bytes) 2020-02-12 10:18 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
causes defect 0044119 closedcaristu Output Content Not Saved In case of error 

-  Notes
(0117678)
caristu (manager)
2020-02-12 10:16

MR: https://gitlab.com/openbravo/product/pmods/org.openbravo.externaldata.integration/-/merge_requests/1 [^]
(0119716)
hgbot (developer)
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
---

- Issue History
Date Modified Username Field Change
2019-12-12 18:54 caristu New Issue
2019-12-12 18:54 caristu Assigned To => caristu
2019-12-12 18:54 caristu File Added: handleError.diff
2020-02-11 19:34 caristu Steps to Reproduce Updated View Revisions
2020-02-11 19:34 caristu File Added: failureEH.diff
2020-02-12 10:16 caristu Note Added: 0117678
2020-02-12 10:17 caristu Status new => acknowledged
2020-02-12 10:17 caristu Status acknowledged => scheduled
2020-02-12 10:18 caristu File Deleted: failureEH.diff
2020-02-12 10:18 caristu File Added: failureEH.diff
2020-02-12 10:19 caristu Steps to Reproduce Updated View Revisions
2020-02-12 16:03 caristu Review Assigned To => AugustoMauch
2020-05-07 15:51 martinsdan Issue Monitored: martinsdan
2020-05-08 17:51 hgbot Checkin
2020-05-08 17:51 hgbot Note Added: 0119716
2020-05-08 17:51 hgbot Status scheduled => resolved
2020-05-08 17:51 hgbot Resolution open => fixed
2020-05-08 17:51 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.externaldata.integration/rev/add838f2fe9e5d59a7eb7ec4007dc4229554717c [^]
2020-05-08 17:51 caristu Status resolved => closed
2020-05-20 13:13 caristu Relationship added causes 0044119


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker