Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0034213Openbravo ERPA. Platformpublic2016-10-17 08:472018-04-20 09:58
alostale 
shuehner 
normalminorN/A
closedfixed 
5
 
3.0PR18Q3 
alostale
Core
No
0034213: clean up AD_Model_Object and AD_Model_Object_Mapping
The main purpose of AD_Model_Object and AD_Model_Object_Mapping tables is to define in dictionary the mappings for web.xml. After 0032366 and 0032512, callouts are no longer defined as servlets.

Therefore mappings for them (which are not currently included in web.xml) should be removed.

Note, even they are not used for web.xml, callouts require of AD_Model_Object row to define the java class they use.
-
* Review and clean unneeded entries up
* Add validation to prevent future cases
No tags attached.
related to design defect 00323663.0PR16Q4 closed inigosanchez Openbravo ERP callout invocation ineficiencies 
related to feature request 00325123.0PR17Q1 closed alostale Openbravo ERP support WildFly 10 
related to defect 0038368 closed shuehner Openbravo ERP API-change for removal of obsolete ad_model_object_mapping for callouts in pi. 
related to defect 0038370 closed shuehner Openbravo ERP Stop auto-adding new html mapping for every new callout (in ad_callout_trg) 
related to defect 0035540 closed alostale Openbravo ERP Traceability Report does not work 
related to defect 0038257 closed shuehner Retail Modules Cleanup obsolete callout related ad_model_object_mapping entries 
blocks design defect 0032688 acknowledged Triage Platform Base Openbravo ERP remove unused resources 
? SimpleCalloutMappingTest.java (4,228) 2017-01-13 14:21
https://issues.openbravo.com/file_download.php?file_id=10299&type=bug
Issue History
2016-10-17 08:47alostaleNew Issue
2016-10-17 08:47alostaleAssigned To => platform
2016-10-17 08:47alostaleModules => Core
2016-10-17 08:47alostaleTriggers an Emergency Pack => No
2016-10-17 08:47alostaleRelationship addedrelated to 0032366
2016-10-17 08:47alostaleRelationship addedrelated to 0032512
2016-12-01 12:11alostaleRelationship addedblocks 0032688
2016-12-01 12:11alostaleStatusnew => acknowledged
2016-12-01 12:11alostaleTarget Version3.0PR17Q1 =>
2017-01-13 13:56alostaleProposed Solution updated
2017-01-13 14:21shuehnerFile Added: SimpleCalloutMappingTest.java
2017-01-13 14:23shuehnerNote Added: 0093544
2017-03-21 09:18alostaleRelationship addedrelated to 0035540
2018-03-30 14:10shuehnerRelationship addedrelated to 0038257
2018-04-14 14:23shuehnerNote Added: 0103884
2018-04-14 14:24shuehnerAssigned Toplatform => shuehner
2018-04-14 14:26shuehnerRelationship addedrelated to 0038368
2018-04-14 14:28hgbotCheckin
2018-04-14 14:28hgbotNote Added: 0103885
2018-04-14 14:28hgbotStatusacknowledged => resolved
2018-04-14 14:28hgbotResolutionopen => fixed
2018-04-14 14:28hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/0ddd9d57e495bafab879eec45a978f2555fdf757 [^]
2018-04-14 14:28shuehnerReview Assigned To => alostale
2018-04-14 15:16shuehnerRelationship addedrelated to 0038370
2018-04-20 09:58alostaleNote Added: 0104008
2018-04-20 09:58alostaleStatusresolved => closed
2018-04-20 09:58alostaleFixed in Version => 3.0PR18Q3

Notes
(0093544)
shuehner   
2017-01-13 14:23   
In addition to cleanup the existing mappings i think we should also add a check to not introduce new mappings we don't really need.

The attached new junit test is quick start to find those mappings. It is based on our ClassLoaderTest adapted a bit to check for 'extends SimpleCallout' & checking for any mappings

Test maybe need some review + cleanup but is a start.

Note:
Probably only callouts should be cleaned up if the directly or indirectly depend on ERP 16Q4 which has the change of SimpleCallout. Either a note to the output or a check in the code could be added to avoid introducing issues here.
(0103884)
shuehner   
2018-04-14 14:23   
The following commit published in 17Q1 (as part of wildfly support) disabled generaing any web.xml servlet mapping for callouts (simplecallout + also old servlet based ones).
https://code.openbravo.com/erp/devel/pi/rev/b468094df0d0ff1d168a03977ba314f64549b998 [^]

That means and every mapping for callout is no longer useful to have in xml if it is used with >=17Q1.
(0103885)
hgbot   
2018-04-14 14:28   
Repository: erp/devel/pi
Changeset: 0ddd9d57e495bafab879eec45a978f2555fdf757
Author: Stefan Hühner <stefan.huehner <at> openbravo.com>
Date: Fri Mar 30 13:56:25 2018 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/0ddd9d57e495bafab879eec45a978f2555fdf757 [^]

Fixed 34213. Delete obsolete ad_model_object_mappings related to callouts.

Since commit b468094df0d0 (shipped in 17Q1 any callout related
model object(& mapping) are not generated into web.xml
As consequence all those ad_model_object mapping entries are obsolete and
hereby removed.
This applies both to SimpleCallout and old callouts still implementing a
servlet as FIC code does calls those old servlets directly in java without
doing a real http call.

---
M src-db/database/sourcedata/AD_MODEL_OBJECT_MAPPING.xml
R modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODEL_OBJECT_MAPPING.xml
R modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MODEL_OBJECT_MAPPING.xml
R modules/org.openbravo.userinterface.selector/src-db/database/sourcedata/AD_MODEL_OBJECT_MAPPING.xml
---
(0104008)
alostale   
2018-04-20 09:58   
reviewed