Openbravo Issue Tracking System - Modules
View Issue Details
0039083ModulesExternal Data Integrationpublic2018-08-02 09:402019-05-29 12:41
naiaramartinez 
AugustoMauch 
normaltrivialhave not tried
closedfixed 
5
 
 
caristu
0039083: When re-processing the EDL is not saving the error in Response field
When an EDL is processed the first time with Error, the error message is stored in Response field. Then, if the data is modified in order to fix the error, and the EDL is reprocessed, in case there is a new error, this error is shown only in the message bar but it is not stored in Response field.

See attached an image to understand it better.
- Install the EDL Examples module [1]
- Add the following code to SyncUOMImportProcessItemProcessor to force an error:

  @Override
  protected void processItem(JSONObject item) throws OBException {
    throw new OBException("Error message 1");
  }

- Execute the Import UOM Synchronously process (available in the menu)
- The resulting EDL Request will show the proper error message
- Update SyncUOMImportProcessItemProcessor, replace "Error message 1" with "Error message 2"
- Reprocess the EDL Request. "Error message 2" will be shown in the status bar, but not in the Response field of the request
- Replace throw new OBException("Error message 1"); with super.processItem(item);. The process will run successfully, but the Status and Response fields of the EDL request are not updated.


[1] https://code.openbravo.com/erp/pmods/org.openbravo.externaldata.integration.examples/ [^]
No tags attached.
related to defect 0039174 closed AugustoMauch SERQA 4522: EDL: Errors not deleted from import entry when reprocessed 
jpeg EDL Error.jpeg (50,533) 2018-08-02 09:40
https://issues.openbravo.com/file_download.php?file_id=12024&type=bug
jpeg
Issue History
2018-08-02 09:40naiaramartinezNew Issue
2018-08-02 09:40naiaramartinezAssigned To => platform
2018-08-02 09:40naiaramartinezFile Added: EDL Error.jpeg
2018-08-02 09:40naiaramartinezModules => Core
2018-08-02 09:40naiaramartinezTriggers an Emergency Pack => No
2018-08-03 13:41caristuSummary[LA EUROPEA] When re-processing the EDL is not saving the error in Response field => When re-processing the EDL is not saving the error in Response field
2018-08-30 08:27caristuProjectOpenbravo ERP => Modules
2018-08-30 08:28caristuCategoryA. Platform => External Data Integration
2018-08-30 08:28caristuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=17580#r17580
2018-08-30 08:45caristuRelationship addedrelated to 0039174
2019-05-22 13:09hgbotCheckin
2019-05-22 13:09hgbotNote Added: 0112071
2019-05-22 13:09hgbotStatusnew => resolved
2019-05-22 13:09hgbotResolutionopen => fixed
2019-05-22 13:09hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.externaldata.integration/rev/6761585197db450f1e50b6646723b5feef61786d [^]
2019-05-22 13:10AugustoMauchReview Assigned To => caristu
2019-05-22 13:35AugustoMauchSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=18808#r18808
2019-05-22 15:43AugustoMauchAssigned Toplatform => AugustoMauch
2019-05-28 18:33hgbotCheckin
2019-05-28 18:33hgbotNote Added: 0112213
2019-05-29 12:41caristuNote Added: 0112222
2019-05-29 12:41caristuStatusresolved => closed

Notes
(0112071)
hgbot   
2019-05-22 13:09   
Repository: erp/pmods/org.openbravo.externaldata.integration
Changeset: 6761585197db450f1e50b6646723b5feef61786d
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Wed May 22 13:08:50 2019 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.externaldata.integration/rev/6761585197db450f1e50b6646723b5feef61786d [^]

Fixes issue 39083: Reprocessing EDL request should update Status and Response

The problem was that when a synchronized EDL request was reprocessed, its status and response
fields were not being updated.

Now the setResponse method of the EDL Request is invoked with the updated response, and also
the EDL Request is being refreshed, because otherwise the changes were not flushed to the database.
This could happen because when there is an error, the session is closed before the response and
status fields are updated.

---
M src/org/openbravo/externaldata/integration/process/ProcessRequest.java
---
(0112213)
hgbot   
2019-05-28 18:33   
Repository: erp/pmods/org.openbravo.externaldata.integration
Changeset: 38b689b3ea125f7081f71017e024944082cec570
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue May 28 18:32:29 2019 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.externaldata.integration/rev/38b689b3ea125f7081f71017e024944082cec570 [^]

Related with issue 39083: Removes unneeded commitAndClose

There is no need to manually commit the connection at that point, it will be done the DalThreadHandler

---
M src/org/openbravo/externaldata/integration/process/ProcessRequest.java
---
(0112222)
caristu   
2019-05-29 12:40   
Reviewed + tested OK