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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0041433
TypeCategorySeverityReproducibilityDate SubmittedLast Update
feature request[Modules] SAP Connectormajorhave not tried2019-07-23 13:172019-08-02 08:36
ReporterAugustoMauchView Statuspublic 
Assigned ToAugustoMauch 
PrioritynormalResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision2e4ce8eb10fd
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Regression date
Regression introduced by commit
Regression level
Review Assigned Tocaristu
Regression introduced in release
Summary

0041433: It should be possible to programatically transform iDoc before they are processed by the IdocUnwrapper

DescriptionThe IdocUnwrapper requires a specific iDoc structure in order to work properly. After the control segment (EDI_DC40), the next segment must contain a structure that represents an Openbravo entity.

Sometimes this main segment is missing (this is managed by using a flag in the Entity Mapping window), but sometimes the changes required to properly prepare the iDoc are more complex and must be done programatically.

It should be possible to define an IdocTransformer, that would transform an Idoc before it is processed by the IdocUnwrapper. The IdocTransformer should have the EntityMappingId annotation to specify to which entity mapping it refers to.
Steps To Reproduce-
TagsNo tags attached.
Attached Filesxml file icon WP_PER_NEW_STRUCTURE.xml [^] (1,269 bytes) 2019-07-23 13:30
diff file icon newIdocStructure.diff [^] (5,735 bytes) 2019-07-23 13:32 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0113593)
hgbot (developer)
2019-07-23 13:25

Repository: erp/pmods/org.openbravo.service.integration.sapecc
Changeset: 2e4ce8eb10fd5c3b583d4e7167b066a8cdac033c
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Jul 23 13:24:03 2019 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.service.integration.sapecc/rev/2e4ce8eb10fd5c3b583d4e7167b066a8cdac033c [^]

Fixes issue 41433: Enables programatically modifying the structure of an idoc

Now it is possible to programatically modify the structure of an idoc by implementing en IdocTransformer
annotated with the proper EntityMappingId.

This enables working with iDocs that have an structure that is not supported by the IdocUnwrapper.

---
M src/org/openbravo/service/integration/sapecc/edl/ImportDataProcessor.java
A src/org/openbravo/service/integration/sapecc/idoc/IdocTransformer.java
---
(0113594)
hgbot (developer)
2019-07-23 13:25

Repository: erp/pmods/org.openbravo.service.integration.sapecc
Changeset: 53e3b592d9d1b1d4e688ba5b732a821e1d05db6f
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Jul 23 13:25:45 2019 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.service.integration.sapecc/rev/53e3b592d9d1b1d4e688ba5b732a821e1d05db6f [^]

Related with issue 41433: Adds automated test

---
M src-test/org/openbravo/service/integration/sapecc/SapEccTestSuite.java
A src-test/data/transformedFormattedIdoc.xml
A src-test/org/openbravo/service/integration/sapecc/edl/IdocTransformerShould.java
A src-test/org/openbravo/service/integration/sapecc/edl/TestIdocTransformer.java
---
(0113595)
AugustoMauch (manager)
2019-07-23 13:29

To test it, apply the attached patch (it adds a transformer for the WP_PER idoc), and import the attached idoc.

In the attached idoc, the usual main segment of the WP_PER is wrapped inside another segment. The attached transformed gets rid of this extra segment.
(0113629)
hgbot (developer)
2019-07-24 18:36

Repository: erp/pmods/org.openbravo.service.integration.sapecc
Changeset: bd30dba8027e421b3fd49cfafd07b8e596c20ad6
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Wed Jul 24 18:36:25 2019 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.service.integration.sapecc/rev/bd30dba8027e421b3fd49cfafd07b8e596c20ad6 [^]

Related with issue 41433: New functionality can be used in IdocImportTestHelper

---
M src-test/org/openbravo/service/integration/sapecc/edl/IdocImportTestHelper.java
---
(0113771)
caristu (manager)
2019-08-02 08:36

Reviewed

- Issue History
Date Modified Username Field Change
2019-07-23 13:17 AugustoMauch New Issue
2019-07-23 13:17 AugustoMauch Assigned To => AugustoMauch
2019-07-23 13:25 hgbot Checkin
2019-07-23 13:25 hgbot Note Added: 0113593
2019-07-23 13:25 hgbot Status new => resolved
2019-07-23 13:25 hgbot Resolution open => fixed
2019-07-23 13:25 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.service.integration.sapecc/rev/2e4ce8eb10fd5c3b583d4e7167b066a8cdac033c [^]
2019-07-23 13:25 hgbot Checkin
2019-07-23 13:25 hgbot Note Added: 0113594
2019-07-23 13:26 AugustoMauch Review Assigned To => caristu
2019-07-23 13:29 AugustoMauch Note Added: 0113595
2019-07-23 13:30 AugustoMauch File Added: WP_PER_NEW_STRUCTURE.xml
2019-07-23 13:32 AugustoMauch File Added: newIdocStructure.diff
2019-07-24 18:36 hgbot Checkin
2019-07-24 18:36 hgbot Note Added: 0113629
2019-08-02 08:36 caristu Note Added: 0113771
2019-08-02 08:36 caristu Status resolved => closed


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker