Hello with the thread https://lists.apache.org/thread.html/Zoz5yfpkrfcxts1 and the voluntary to have a good coherence on crud service name,

I would be have your suggest to manage old name and deprecated process.

I review the issue OFBIZ-9550 [1] that contains this problematic :

-    <service name="addPromoToMarketingCampaign" ...
+    <service name="createMarketingCampaignPromo" ...

Currently I follow this process :

* duplicate the service definition
* Rename the duplicate with the correct name
* Set "DEPRECATED : use ${new service} instead" in the service description
* implement on old service definition : return error("use ${new service} instead") to help developer to correct their specific code.

I image that we can create a generic code to return the error and change the old service definition like this :

    <service name="addPromoToMarketingCampaign" default-entity-name="MarketingCampaignPromo" 
engine="deprecated" invoke="create" auth="true">
         <description>Deprecated please replace by 
createMarketingCampaignPromo</description>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>

And deprecated engine return always error with the service description.

After a new ofbiz stable branche creation, we remove all deprecated service ?

Any suggests, othet ideas, comments ?

Cheers,

Nicolas

[1] https://issues.apache.org/jira/browse/OFBIZ-9550

--
logoNrd <https://nereide.fr/>
        Nicolas Malin
The apache way <http://theapacheway.com/> : *Openness* Technical decisions are made publicly
informat...@nereide.fr
8 rue des Déportés 37000 TOURS, 02 47 50 30 54

Apache OFBiz <http://ofbiz.apache.org/>|The Apache Way <http://theapacheway.com/>|ofbiz-fr <http://www.ofbiz-fr.org/>|réseau LE <http://www.libre-entreprise.org/>

Reply via email to