Openbravo Issue Tracking System - Modules
View Issue Details
0038503ModulesExternal Data Integrationpublic2018-05-08 17:042019-01-08 09:37
AugustoMauch 
AugustoMauch 
normalminorhave not tried
closedfixed 
5
 
 
caristu
0038503: Allow to define dependencies between EDL Requests
It would be very useful if there dependencies could be defined between EDL Requests. It would work like this:
- EDL Requests A and B are created. B depends on A. Suppose that each EDL Request will result in two EDL Request Lines.
- A and B are scheduled to be executed asynchronously
- B will not be executed until of the EDL Request Lines of A have been processed

This will be used by the Connector Infrastructure, to ensure that when exporting entities that have dependencies between them (i.e. Order depends on Business Partner), they will be exported in the proper order.
-
No tags attached.
related to defect 0039687 closed caristu Log Clean Up does not clear EDL Requests that have dependencies 
Issue History
2018-05-08 17:04AugustoMauchNew Issue
2018-05-08 17:04AugustoMauchAssigned To => AugustoMauch
2018-05-08 19:06hgbotCheckin
2018-05-08 19:06hgbotNote Added: 0104337
2018-05-08 19:06hgbotStatusnew => resolved
2018-05-08 19:06hgbotResolutionopen => fixed
2018-05-08 19:06hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.externaldata.integration/rev/8be5efcd1832d045af5e663017c36417794ec92f [^]
2018-05-10 09:07hgbotCheckin
2018-05-10 09:07hgbotNote Added: 0104441
2018-05-10 17:40AugustoMauchReview Assigned To => caristu
2018-05-31 17:08caristuNote Added: 0104847
2018-05-31 17:08caristuStatusresolved => new
2018-05-31 17:08caristuResolutionfixed => open
2018-05-31 17:16caristuIssue cloned0038674
2018-09-10 10:24hgbotCheckin
2018-09-10 10:24hgbotNote Added: 0106647
2018-09-10 10:24hgbotStatusnew => resolved
2018-09-10 10:24hgbotResolutionopen => fixed
2018-09-10 10:24hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.externaldata.integration/rev/8be5efcd1832d045af5e663017c36417794ec92f [^] => http://code.openbravo.com/erp/pmods/org.openbravo.service.external.integration/rev/8bd0ca2a989c53d4df7556323cd8240618e725f5 [^]
2018-09-10 13:23AugustoMauchNote Deleted: 0106647
2018-09-10 13:48hgbotCheckin
2018-09-10 13:48hgbotNote Added: 0106665
2018-09-10 13:48hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.service.external.integration/rev/8bd0ca2a989c53d4df7556323cd8240618e725f5 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.externaldata.integration/rev/8345b5da585e5bad8eaf71b0ec6723c953de66e2 [^]
2018-09-12 10:00hgbotCheckin
2018-09-12 10:00hgbotNote Added: 0106697
2018-09-21 10:00hgbotCheckin
2018-09-21 10:00hgbotNote Added: 0106921
2018-09-21 10:00hgbotCheckin
2018-09-21 10:00hgbotNote Added: 0106922
2018-09-21 10:02caristuNote Added: 0106923
2018-09-21 10:02caristuStatusresolved => closed
2018-11-23 11:56caristuRelationship addedrelated to 0039687
2018-12-21 13:43hgbotCheckin
2018-12-21 13:43hgbotNote Added: 0108722
2018-12-21 13:43hgbotStatusclosed => resolved
2018-12-21 13:43hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.externaldata.integration/rev/8345b5da585e5bad8eaf71b0ec6723c953de66e2 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.service.external.integration/rev/d29825e526f21e7d4772a48ed8aefc6d57f978a4 [^]
2019-01-08 09:37AugustoMauchStatusresolved => closed

Notes
(0104337)
hgbot   
2018-05-08 19:06   
Repository: erp/pmods/org.openbravo.externaldata.integration
Changeset: 8be5efcd1832d045af5e663017c36417794ec92f
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue May 08 19:05:55 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.externaldata.integration/rev/8be5efcd1832d045af5e663017c36417794ec92f [^]

Fixes issue 38503: It is possible to define dependencies between EDL Requests

Now it is possible to define dependencies between EDL Requests, and the EDLImportEntryProcessor will
only process an EDL Request if all its dependencies have been satisfied.

The API to define the EDL Requests with their dependencies is:

  public OBEDLRequest addRequest(String processId, Object data, Writer responseWriter,
      ExecutionMode executionMode, List<OBEDLRequest> dependencies)

---
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_ELEMENT.xml
M src-db/database/sourcedata/AD_FIELD.xml
M src-db/database/sourcedata/AD_REFERENCE.xml
M src-db/database/sourcedata/AD_TAB.xml
M src-db/database/sourcedata/AD_TABLE.xml
M src/org/openbravo/externaldata/integration/handlers/RequestLineReprocessHandler.java
M src/org/openbravo/externaldata/integration/process/EDLImportEntryProcessor.java
M src/org/openbravo/externaldata/integration/process/ProcessRequest.java
A src-db/database/model/tables/OBEDL_REQUEST_DEPENDENCY.xml
A src-db/database/sourcedata/OBUISEL_SELECTOR.xml
---
(0104441)
hgbot   
2018-05-10 09:07   
Repository: erp/pmods/org.openbravo.externaldata.integration
Changeset: a562a797aa1af4c5bd88e8f0a9d57ba46abbdcc3
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Thu May 10 09:06:45 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.externaldata.integration/rev/a562a797aa1af4c5bd88e8f0a9d57ba46abbdcc3 [^]

related to issue 38503: add missing index to parent column

---
M src-db/database/model/tables/OBEDL_REQUEST_DEPENDENCY.xml
---
(0104847)
caristu   
2018-05-31 17:08   
Found some minor code improvements. Reopened to check them. See:

https://docs.google.com/spreadsheets/d/18l2biKWeG6iGDIPqO6VuYQ_TtP_6YxyQU4KSrPvQlJ8/edit#gid=0 [^]
(0106665)
hgbot   
2018-09-10 13:48   
Repository: erp/pmods/org.openbravo.externaldata.integration
Changeset: 8345b5da585e5bad8eaf71b0ec6723c953de66e2
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Mon Sep 10 13:47:18 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.externaldata.integration/rev/8345b5da585e5bad8eaf71b0ec6723c953de66e2 [^]

Fixes issue 38503: Applies code review comments

- Adds comment to RequestLineReprocessHandler.updateImportEntryIfNeeded to clarify intent
- Adds description for Obedl_Request_Dependency_ID
- Removes uneeded setAdminMode block on EDLEntryProcessRunnable.allRequestLinesAreProcessed
- Use Collections.emptyList() instead of new ArrayList()

---
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_FIELD.xml
M src/org/openbravo/externaldata/integration/handlers/RequestLineReprocessHandler.java
M src/org/openbravo/externaldata/integration/process/EDLImportEntryProcessor.java
M src/org/openbravo/externaldata/integration/process/ProcessRequest.java
---
(0106697)
hgbot   
2018-09-12 10:00   
Repository: erp/pmods/org.openbravo.externaldata.integration
Changeset: 60cd406aac03e4ab00e74b56bc86ac7dd69a8746
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Wed Sep 12 10:00:40 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.externaldata.integration/rev/60cd406aac03e4ab00e74b56bc86ac7dd69a8746 [^]

Related with issue 38503: Adds missing AD_ELEMENT changes

---
M src-db/database/sourcedata/AD_ELEMENT.xml
---
(0106921)
hgbot   
2018-09-21 10:00   
Repository: erp/pmods/org.openbravo.externaldata.integration
Changeset: 0cc65c870594efb9974f0fd013458d33a35f430f
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Fri Sep 21 09:59:30 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.externaldata.integration/rev/0cc65c870594efb9974f0fd013458d33a35f430f [^]

related to issue 38503: Don't execute addDependencies if the list is empty

---
M src/org/openbravo/externaldata/integration/process/ProcessRequest.java
---
(0106922)
hgbot   
2018-09-21 10:00   
Repository: erp/pmods/org.openbravo.externaldata.integration
Changeset: 40d395825d7aeffe1a1dc362613961c4ceef8cd9
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Fri Sep 21 09:59:47 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.externaldata.integration/rev/40d395825d7aeffe1a1dc362613961c4ceef8cd9 [^]

related to issue 38503: Update copyright year

---
M src/org/openbravo/externaldata/integration/process/EDLImportEntryProcessor.java
---
(0106923)
caristu   
2018-09-21 10:02   
Code reviewed + tested OK
(0108722)
hgbot   
2018-12-21 13:43   
Repository: erp/pmods/org.openbravo.service.external.integration
Changeset: d29825e526f21e7d4772a48ed8aefc6d57f978a4
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Mon Sep 10 10:19:53 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.service.external.integration/rev/d29825e526f21e7d4772a48ed8aefc6d57f978a4 [^]

Fixes bug 38503:Avoid infinite loop if mapping not scheduled with dependencies

If a entity mapping was included in a process request, but any of its depencies were not, the process
that orders the entity mappings based on their dependencies entered an infinite loop.

Now an entity mapping is added to the list of ordered dependencies if:
- Its dependencies are already in the ordered list, or
- Any of its depencies are not scheduled in that process request. In that case a warning will be logged

---
M src/org/openbravo/service/external/integration/process/ExternalSynchronizationProcess.java
---