/[Apache-SVN]
ViewVC logotype

Revision 1847056


Jump to revision: Previous Next
Author: nmalin
Date: Tue Nov 20 20:19:34 2018 UTC (5 years, 4 months ago)
Changed paths: 6
Log Message:
Improved: Migrate from minilang to entity-auto createQuoteWorkEffort et deleteQuoteWorkEffort.
(OFBIZ-10553)
But createQuoteWorkEffort is not a crud service on entity QuoteWorkEffort because it is linked to a seca to call createWorkeffort before if a workEffortId is not present in context.

<eca service="createQuoteWorkEffort" event="in-validate">
   <condition field-name="workEffortId" operator="is-empty"/>
   <action service="createWorkEffort" mode="sync"/>
</eca>

I converted this service createQuoteWorkEffort has a real Crud service and create an other ensureWorkEffortAndCreateQuoteWorkEffort to simulate the attendee process. Now we have a coherent service naming and not surprise for developer .
To manage the service createQuoteWorkEffort as deprecated, I define it twice

     <service name="createQuoteWorkEffort" default-entity-name="QuoteWorkEffort" engine="entity-auto" invoke="create" auth="true">
        <deprecated use-instead="ensureWorkEffortAndCreateQuoteWorkEffort" since="Upcoming Release">
            use createQuoteWorkEffort to create a workeffort has been deprecated for best pratice naming reason, use ensureWorkEffortAndCreateQuoteWorkEffort instead.
            Now createQuoteWorkEffort work as a crud service on QuoteWorkEffort
        </deprecated>
    </service>
    <service name="createQuoteWorkEffort" default-entity-name="QuoteWorkEffort" engine="entity-auto" invoke="create" auth="true">
        <description>Create a new QuoteWorkEffort</description>
        <required-permissions join-type="AND">
            <check-permission permission="ORDERMGR" action="_CREATE"/>
        </required-permissions>
        <auto-attributes mode="IN" include="pk"/>
     </service>

First to alert on deprecation and second ensure that the definition work fine.
In log we will have an alert on the deprecation and an alert on the duplicated definition during the deprecation time.

Thanks to Antoine Ouvrard, Gil Portenseigne, Leila Mekika and Mathieu Lirzin for their review

Changed paths

Path Details
Directoryofbiz/ofbiz-framework/trunk/applications/order/groovyScripts/quote/QuoteServices.groovy added
Directoryofbiz/ofbiz-framework/trunk/applications/order/minilang/test/QuoteTests.xml modified , text changed
Directoryofbiz/ofbiz-framework/trunk/applications/order/servicedef/secas.xml modified , text changed
Directoryofbiz/ofbiz-framework/trunk/applications/order/servicedef/services_quote.xml modified , text changed
Directoryofbiz/ofbiz-framework/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml modified , text changed
Directoryofbiz/ofbiz-framework/trunk/applications/order/widget/ordermgr/QuoteWorkEffortForms.xml modified , text changed

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26