You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Jacques Le Roux <ja...@les7arts.com> on 2017/04/22 09:05:11 UTC

Re: svn commit: r1792270 - in /ofbiz/ofbiz-framework/trunk/applications/order: minilang/quote/QuoteServices.xml servicedef/services_quote.xml

Hi Deepak,

Not sure which commit exactly, but since this one there are related test failures in trunk and R11 https://ci.apache.org/projects/ofbiz/logs/

Thanks

Jacques



Le 22/04/2017 � 09:59, deepak@apache.org a �crit :
> Author: deepak
> Date: Sat Apr 22 07:59:45 2017
> New Revision: 1792270
>
> URL: http://svn.apache.org/viewvc?rev=1792270&view=rev
> Log:
> Improved: Converted create and remove QuoteRole service to entity-auto also added update and expire QuoteRole service.(OFBIZ-9331)
>
> Modified:
>      ofbiz/ofbiz-framework/trunk/applications/order/minilang/quote/QuoteServices.xml
>      ofbiz/ofbiz-framework/trunk/applications/order/servicedef/services_quote.xml
>
> Modified: ofbiz/ofbiz-framework/trunk/applications/order/minilang/quote/QuoteServices.xml
> URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/minilang/quote/QuoteServices.xml?rev=1792270&r1=1792269&r2=1792270&view=diff
> ==============================================================================
> --- ofbiz/ofbiz-framework/trunk/applications/order/minilang/quote/QuoteServices.xml (original)
> +++ ofbiz/ofbiz-framework/trunk/applications/order/minilang/quote/QuoteServices.xml Sat Apr 22 07:59:45 2017
> @@ -281,47 +281,6 @@ under the License.
>           <check-errors/>
>       </simple-method>
>   
> -    <!-- create a new QuoteRole -->
> -    <simple-method method-name="createQuoteRole" short-description="Create a QuoteRole">
> -        <check-permission permission="ORDERMGR" action="_CREATE">
> -            <fail-property resource="OrderErrorUiLabels" property="OrderErrorCreatePermissionError"/>
> -        </check-permission>
> -        <check-errors/>
> -        <set from-field="parameters.partyId" field="lookupPKMap.partyId"/>
> -        <set from-field="parameters.roleTypeId" field="lookupPKMap.roleTypeId"/>
> -        <find-by-primary-key entity-name="PartyRole" map="lookupPKMap" value-field="partyRole"/>
> -        <if-empty field="partyRole.partyId">
> -            <check-permission permission="PARTYMGR" action="_CREATE">
> -                <fail-property resource="OrderErrorUiLabels" property="OrderErrorCreatePermissionError"/>
> -            </check-permission>
> -            <check-permission permission="PARTYMGR" action="_UPDATE">
> -                <fail-property resource="OrderErrorUiLabels" property="OrderErrorCreatePermissionError"/>
> -            </check-permission>
> -            <check-errors/>
> -            <make-value value-field="partyRole" entity-name="PartyRole"/>
> -            <set-pk-fields map="lookupPKMap" value-field="partyRole"/>
> -            <create-value value-field="partyRole"/>
> -        </if-empty>
> -        <!-- create new entity and create all the fields -->
> -        <make-value value-field="newEntity" entity-name="QuoteRole"/>
> -        <set-pk-fields map="parameters" value-field="newEntity"/>
> -        <create-value value-field="newEntity"/>
> -        <property-to-field resource="OrderUiLabels" property="OrderOrderQuoteRoleAddedSuccessfully" field="successMessage"/>
> -        <check-errors/>
> -    </simple-method>
> -
> -    <!-- remove an existing QuoteRole -->
> -    <simple-method method-name="removeQuoteRole" short-description="Remove an existing QuoteRole">
> -        <check-permission permission="ORDERMGR" action="_DELETE">
> -            <fail-property resource="OrderErrorUiLabels" property="OrderErrorDeletePermissionError"/>
> -        </check-permission>
> -        <check-errors/>
> -        <entity-one entity-name="QuoteRole" value-field="quoteRole" auto-field-map="true"/>
> -        <check-errors/>
> -        <remove-value value-field="quoteRole"/>
> -        <check-errors/>
> -    </simple-method>
> -
>       <!-- create a new QuoteItem -->
>       <simple-method method-name="createQuoteItem" short-description="Create a QuoteItem">
>           <entity-one entity-name="Quote" value-field="quote" auto-field-map="true"/>
>
> Modified: ofbiz/ofbiz-framework/trunk/applications/order/servicedef/services_quote.xml
> URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/servicedef/services_quote.xml?rev=1792270&r1=1792269&r2=1792270&view=diff
> ==============================================================================
> --- ofbiz/ofbiz-framework/trunk/applications/order/servicedef/services_quote.xml (original)
> +++ ofbiz/ofbiz-framework/trunk/applications/order/servicedef/services_quote.xml Sat Apr 22 07:59:45 2017
> @@ -69,16 +69,37 @@ under the License.
>           <auto-attributes include="pk" mode="IN" optional="false"/>
>       </service>
>       <!-- QuoteRole  -->
> -    <service name="createQuoteRole" default-entity-name="QuoteRole" engine="simple"
> -                location="component://order/minilang/quote/QuoteServices.xml" invoke="createQuoteRole" auth="true">
> +    <service name="createQuoteRole" default-entity-name="QuoteRole" engine="entity-auto" invoke="create" auth="true">
>           <description>Create a QuoteRole</description>
> -        <auto-attributes include="pk" mode="INOUT" optional="true"/>
> +        <required-permissions join-type="AND">
> +            <check-permission permission="ORDERMGR" action="_CREATE"/>
> +        </required-permissions>
> +        <auto-attributes mode="IN" include="pk" />
> +        <auto-attributes mode="IN" include="nonpk" optional="true"/>
> +        <!-- make fromDate as optional for backward compatibility, EntityAuto engine automatically set the fromDate to nowTimestamp if its not missing-->
> +        <override name="fromDate" mode="IN" optional="true"/>
>       </service>
> -    <service name="removeQuoteRole" default-entity-name="QuoteRole" engine="simple"
> -                location="component://order/minilang/quote/QuoteServices.xml" invoke="removeQuoteRole" auth="true">
> +    <service name="updateQuoteRole" default-entity-name="QuoteRole" engine="entity-auto" invoke="update" auth="true">
> +        <description>Update a QuoteRole</description>
> +        <required-permissions join-type="AND">
> +            <check-permission permission="ORDERMGR" action="_UPDATE"/>
> +        </required-permissions>
> +        <auto-attributes mode="IN" include="pk" />
> +        <auto-attributes mode="IN" include="nonpk" optional="true"/>
> +    </service>
> +    <service name="removeQuoteRole" default-entity-name="QuoteRole" engine="entity-auto" invoke="delete" auth="true">
>           <description>Remove a QuoteRole</description>
> -        <auto-attributes include="pk" mode="INOUT" optional="true"/>
> -        <auto-attributes include="nonpk" mode="IN" optional="true"/>
> +        <required-permissions join-type="AND">
> +            <check-permission permission="ORDERMGR" action="_DELETE"/>
> +        </required-permissions>
> +        <auto-attributes include="pk" mode="IN" optional="false"/>
> +    </service>
> +    <service name="removeQuoteRole" default-entity-name="QuoteRole" engine="entity-auto" invoke="expire" auth="true">
> +        <description>Expire a QuoteRole</description>
> +        <required-permissions join-type="AND">
> +            <check-permission permission="ORDERMGR" action="_UPDATE"/>
> +        </required-permissions>
> +        <auto-attributes include="pk" mode="IN" optional="false"/>
>       </service>
>       <!-- QuoteItem  -->
>       <service name="createQuoteItem" default-entity-name="QuoteItem" engine="simple"
>
>
>


Re: svn commit: r1792270 - in /ofbiz/ofbiz-framework/trunk/applications/order: minilang/quote/QuoteServices.xml servicedef/services_quote.xml

Posted by Scott Gray <sc...@hotwaxsystems.com>.
Having tests setup and teardown the data they need would possibly allow us
to run test suites in parallel which would dramatically decrease the
processing time.

I like having the tests depend on the database though, in the past it's
been helpful for spotting deadlocks.

Regards
Scott

On 24 April 2017 at 20:44, Jacques Le Roux <ja...@les7arts.com>
wrote:

> Le 22/04/2017 à 12:11, Taher Alkhateeb a écrit :
>
>> Also, In my opinion, data
>> should be generated on the fly inside the tests, not pre-loaded or
>> depending on demo data.
>>
> That would be indeed more inline with how tests are recommended to be done
>
>> It would be even better if the tests bypass the
>> database completely and just test the functionality without reverting to
>> the database.
>>
> It's possible for real unit tests (like those which were added and run by
> Gradle) but I doubt it's possible to replace current integration tests w/o
> relying on the DB.
>
> Jacques
>
>

Re: svn commit: r1792270 - in /ofbiz/ofbiz-framework/trunk/applications/order: minilang/quote/QuoteServices.xml servicedef/services_quote.xml

Posted by Jacques Le Roux <ja...@les7arts.com>.
Le 22/04/2017 � 12:11, Taher Alkhateeb a �crit :
> Also, In my opinion, data
> should be generated on the fly inside the tests, not pre-loaded or
> depending on demo data.
That would be indeed more inline with how tests are recommended to be done
> It would be even better if the tests bypass the
> database completely and just test the functionality without reverting to
> the database.
It's possible for real unit tests (like those which were added and run by Gradle) but I doubt it's possible to replace current integration tests w/o 
relying on the DB.

Jacques


Re: svn commit: r1792270 - in /ofbiz/ofbiz-framework/trunk/applications/order: minilang/quote/QuoteServices.xml servicedef/services_quote.xml

Posted by Taher Alkhateeb <sl...@gmail.com>.
Unfortunately, the tests and the data the tests depend on right now are a
complete mess. I am getting close to completing a large commit to
disentangle the framework from an dependencies on the ecommerce component.
I learned in the process that the data (and tests which depend on it) are
like a house of cards, just move one thing and the whole thing comes
crashing down.

In my opinion we need to centralize the entities, services, data and tests.
Having components depend on components which depend on further components
is very painful and time consuming to track. Also, In my opinion, data
should be generated on the fly inside the tests, not pre-loaded or
depending on demo data. It would be even better if the tests bypass the
database completely and just test the functionality without reverting to
the database.

On Sat, Apr 22, 2017 at 1:02 PM, Deepak Dixit <deepak.dixit@hotwaxsystems.
com> wrote:

> Need to fix some more test cases/service that are using createQuoteRole
> service and assuming that it will crate party role if not exist.
>
> Thanks & Regards
> --
> Deepak Dixit
> www.hotwaxsystems.com
>
> On Sat, Apr 22, 2017 at 3:03 PM, Deepak Dixit <
> deepak.dixit@hotwaxsystems.com> wrote:
>
> > Hi Jacques,
> >
> > Its due to testCreateQuoteRole test case, as we converted this into
> > entity auto, so now onward this does not create PartyRole if its not
> exists.
> >
> > As its entity-auto service so there is no sense to keep the test case for
> > this.
> >
> > Thanks & Regards
> > --
> > Deepak Dixit
> > www.hotwaxsystems.com
> >
> > On Sat, Apr 22, 2017 at 2:38 PM, Deepak Dixit
> <deepak.dixit@hotwaxsystems.
> > com> wrote:
> >
> >> Let me check Jacques
> >>
> >> Thanks & Regards
> >> --
> >> Deepak Dixit
> >> www.hotwaxsystems.com
> >>
> >> On Sat, Apr 22, 2017 at 2:35 PM, Jacques Le Roux <
> >> jacques.le.roux@les7arts.com> wrote:
> >>
> >>> Hi Deepak,
> >>>
> >>> Not sure which commit exactly, but since this one there are related
> test
> >>> failures in trunk and R11 https://ci.apache.org/projects/ofbiz/logs/
> >>>
> >>> Thanks
> >>>
> >>> Jacques
> >>>
> >>>
> >>>
> >>>
> >>> Le 22/04/2017 à 09:59, deepak@apache.org a écrit :
> >>>
> >>>> Author: deepak
> >>>> Date: Sat Apr 22 07:59:45 2017
> >>>> New Revision: 1792270
> >>>>
> >>>> URL: http://svn.apache.org/viewvc?rev=1792270&view=rev
> >>>> Log:
> >>>> Improved: Converted create and remove QuoteRole service to entity-auto
> >>>> also added update and expire QuoteRole service.(OFBIZ-9331)
> >>>>
> >>>> Modified:
> >>>>      ofbiz/ofbiz-framework/trunk/applications/order/minilang/quo
> >>>> te/QuoteServices.xml
> >>>>      ofbiz/ofbiz-framework/trunk/applications/order/servicedef/s
> >>>> ervices_quote.xml
> >>>>
> >>>> Modified: ofbiz/ofbiz-framework/trunk/ap
> plications/order/minilang/quot
> >>>> e/QuoteServices.xml
> >>>> URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/app
> >>>> lications/order/minilang/quote/QuoteServices.xml?rev=1792270
> >>>> &r1=1792269&r2=1792270&view=diff
> >>>> ============================================================
> >>>> ==================
> >>>> --- ofbiz/ofbiz-framework/trunk/applications/order/minilang/quot
> e/QuoteServices.xml
> >>>> (original)
> >>>> +++ ofbiz/ofbiz-framework/trunk/applications/order/minilang/quot
> e/QuoteServices.xml
> >>>> Sat Apr 22 07:59:45 2017
> >>>> @@ -281,47 +281,6 @@ under the License.
> >>>>           <check-errors/>
> >>>>       </simple-method>
> >>>>   -    <!-- create a new QuoteRole -->
> >>>> -    <simple-method method-name="createQuoteRole"
> >>>> short-description="Create a QuoteRole">
> >>>> -        <check-permission permission="ORDERMGR" action="_CREATE">
> >>>> -            <fail-property resource="OrderErrorUiLabels"
> >>>> property="OrderErrorCreatePermissionError"/>
> >>>> -        </check-permission>
> >>>> -        <check-errors/>
> >>>> -        <set from-field="parameters.partyId"
> >>>> field="lookupPKMap.partyId"/>
> >>>> -        <set from-field="parameters.roleTypeId"
> >>>> field="lookupPKMap.roleTypeId"/>
> >>>> -        <find-by-primary-key entity-name="PartyRole"
> map="lookupPKMap"
> >>>> value-field="partyRole"/>
> >>>> -        <if-empty field="partyRole.partyId">
> >>>> -            <check-permission permission="PARTYMGR" action="_CREATE">
> >>>> -                <fail-property resource="OrderErrorUiLabels"
> >>>> property="OrderErrorCreatePermissionError"/>
> >>>> -            </check-permission>
> >>>> -            <check-permission permission="PARTYMGR" action="_UPDATE">
> >>>> -                <fail-property resource="OrderErrorUiLabels"
> >>>> property="OrderErrorCreatePermissionError"/>
> >>>> -            </check-permission>
> >>>> -            <check-errors/>
> >>>> -            <make-value value-field="partyRole"
> >>>> entity-name="PartyRole"/>
> >>>> -            <set-pk-fields map="lookupPKMap"
> value-field="partyRole"/>
> >>>> -            <create-value value-field="partyRole"/>
> >>>> -        </if-empty>
> >>>> -        <!-- create new entity and create all the fields -->
> >>>> -        <make-value value-field="newEntity" entity-name="QuoteRole"/>
> >>>> -        <set-pk-fields map="parameters" value-field="newEntity"/>
> >>>> -        <create-value value-field="newEntity"/>
> >>>> -        <property-to-field resource="OrderUiLabels"
> >>>> property="OrderOrderQuoteRoleAddedSuccessfully"
> >>>> field="successMessage"/>
> >>>> -        <check-errors/>
> >>>> -    </simple-method>
> >>>> -
> >>>> -    <!-- remove an existing QuoteRole -->
> >>>> -    <simple-method method-name="removeQuoteRole"
> >>>> short-description="Remove an existing QuoteRole">
> >>>> -        <check-permission permission="ORDERMGR" action="_DELETE">
> >>>> -            <fail-property resource="OrderErrorUiLabels"
> >>>> property="OrderErrorDeletePermissionError"/>
> >>>> -        </check-permission>
> >>>> -        <check-errors/>
> >>>> -        <entity-one entity-name="QuoteRole" value-field="quoteRole"
> >>>> auto-field-map="true"/>
> >>>> -        <check-errors/>
> >>>> -        <remove-value value-field="quoteRole"/>
> >>>> -        <check-errors/>
> >>>> -    </simple-method>
> >>>> -
> >>>>       <!-- create a new QuoteItem -->
> >>>>       <simple-method method-name="createQuoteItem"
> >>>> short-description="Create a QuoteItem">
> >>>>           <entity-one entity-name="Quote" value-field="quote"
> >>>> auto-field-map="true"/>
> >>>>
> >>>> Modified: ofbiz/ofbiz-framework/trunk/ap
> plications/order/servicedef/se
> >>>> rvices_quote.xml
> >>>> URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/app
> >>>> lications/order/servicedef/services_quote.xml?rev=1792270&r1
> >>>> =1792269&r2=1792270&view=diff
> >>>> ============================================================
> >>>> ==================
> >>>> --- ofbiz/ofbiz-framework/trunk/applications/order/servicedef/se
> rvices_quote.xml
> >>>> (original)
> >>>> +++ ofbiz/ofbiz-framework/trunk/applications/order/servicedef/se
> rvices_quote.xml
> >>>> Sat Apr 22 07:59:45 2017
> >>>> @@ -69,16 +69,37 @@ under the License.
> >>>>           <auto-attributes include="pk" mode="IN" optional="false"/>
> >>>>       </service>
> >>>>       <!-- QuoteRole  -->
> >>>> -    <service name="createQuoteRole" default-entity-name="QuoteRole"
> >>>> engine="simple"
> >>>> -                location="component://order/mi
> >>>> nilang/quote/QuoteServices.xml" invoke="createQuoteRole" auth="true">
> >>>> +    <service name="createQuoteRole" default-entity-name="QuoteRole"
> >>>> engine="entity-auto" invoke="create" auth="true">
> >>>>           <description>Create a QuoteRole</description>
> >>>> -        <auto-attributes include="pk" mode="INOUT" optional="true"/>
> >>>> +        <required-permissions join-type="AND">
> >>>> +            <check-permission permission="ORDERMGR"
> action="_CREATE"/>
> >>>> +        </required-permissions>
> >>>> +        <auto-attributes mode="IN" include="pk" />
> >>>> +        <auto-attributes mode="IN" include="nonpk" optional="true"/>
> >>>> +        <!-- make fromDate as optional for backward compatibility,
> >>>> EntityAuto engine automatically set the fromDate to nowTimestamp if
> its not
> >>>> missing-->
> >>>> +        <override name="fromDate" mode="IN" optional="true"/>
> >>>>       </service>
> >>>> -    <service name="removeQuoteRole" default-entity-name="QuoteRole"
> >>>> engine="simple"
> >>>> -                location="component://order/mi
> >>>> nilang/quote/QuoteServices.xml" invoke="removeQuoteRole" auth="true">
> >>>> +    <service name="updateQuoteRole" default-entity-name="QuoteRole"
> >>>> engine="entity-auto" invoke="update" auth="true">
> >>>> +        <description>Update a QuoteRole</description>
> >>>> +        <required-permissions join-type="AND">
> >>>> +            <check-permission permission="ORDERMGR"
> action="_UPDATE"/>
> >>>> +        </required-permissions>
> >>>> +        <auto-attributes mode="IN" include="pk" />
> >>>> +        <auto-attributes mode="IN" include="nonpk" optional="true"/>
> >>>> +    </service>
> >>>> +    <service name="removeQuoteRole" default-entity-name="QuoteRole"
> >>>> engine="entity-auto" invoke="delete" auth="true">
> >>>>           <description>Remove a QuoteRole</description>
> >>>> -        <auto-attributes include="pk" mode="INOUT" optional="true"/>
> >>>> -        <auto-attributes include="nonpk" mode="IN" optional="true"/>
> >>>> +        <required-permissions join-type="AND">
> >>>> +            <check-permission permission="ORDERMGR"
> action="_DELETE"/>
> >>>> +        </required-permissions>
> >>>> +        <auto-attributes include="pk" mode="IN" optional="false"/>
> >>>> +    </service>
> >>>> +    <service name="removeQuoteRole" default-entity-name="QuoteRole"
> >>>> engine="entity-auto" invoke="expire" auth="true">
> >>>> +        <description>Expire a QuoteRole</description>
> >>>> +        <required-permissions join-type="AND">
> >>>> +            <check-permission permission="ORDERMGR"
> action="_UPDATE"/>
> >>>> +        </required-permissions>
> >>>> +        <auto-attributes include="pk" mode="IN" optional="false"/>
> >>>>       </service>
> >>>>       <!-- QuoteItem  -->
> >>>>       <service name="createQuoteItem" default-entity-name="QuoteItem"
> >>>> engine="simple"
> >>>>
> >>>>
> >>>>
> >>>>
> >>>
> >>
> >
>

Re: svn commit: r1792270 - in /ofbiz/ofbiz-framework/trunk/applications/order: minilang/quote/QuoteServices.xml servicedef/services_quote.xml

Posted by Jacques Le Roux <ja...@les7arts.com>.
Thanks!

Jacques


Le 25/04/2017 � 20:30, Deepak Dixit a �crit :
> Done at r#1792638  also backported to release 16.11
> All test passed on local machine.
>
> Its not an dirty fix there are some occurrence of ensurePartyRole as action
> service in seca files.
>
>
> Thanks & Regards
> --
> Deepak Dixit
> www.hotwaxsystems.com
>
> On Tue, Apr 25, 2017 at 11:40 PM, Deepak Dixit <
> deepak.dixit@hotwaxsystems.com> wrote:
>
>> Quick and dirty fix will be add and eca on createQuoteRole to
>> ensurePartyRole.
>> Let me run the test cases.
>>
>> Thanks & Regards
>> --
>> Deepak Dixit
>> www.hotwaxsystems.com
>>
>> On Tue, Apr 25, 2017 at 11:06 PM, Jacques Le Roux <
>> jacques.le.roux@les7arts.com> wrote:
>>
>>> Hi Deepak,
>>>
>>> Any chances since to fix, at least temporarily, the tests?
>>>
>>> Thanks
>>>
>>> Jacques
>>>
>>>
>>>
>>> Le 22/04/2017 � 12:07, Jacques Le Roux a �crit :
>>>
>>>> Thanks Deepak
>>>>
>>>>
>>>> Le 22/04/2017 � 12:02, Deepak Dixit a �crit :
>>>>
>>>>> Need to fix some more test cases/service that are using createQuoteRole
>>>>> service and assuming that it will crate party role if not exist.
>>>>>
>>>>> Thanks & Regards
>>>>> --
>>>>> Deepak Dixit
>>>>> www.hotwaxsystems.com
>>>>>
>>>>> On Sat, Apr 22, 2017 at 3:03 PM, Deepak Dixit <
>>>>> deepak.dixit@hotwaxsystems.com> wrote:
>>>>>
>>>>> Hi Jacques,
>>>>>> Its due to testCreateQuoteRole test case, as we converted this into
>>>>>> entity auto, so now onward this does not create PartyRole if its not
>>>>>> exists.
>>>>>>
>>>>>> As its entity-auto service so there is no sense to keep the test case
>>>>>> for
>>>>>> this.
>>>>>>
>>>>>> Thanks & Regards
>>>>>> --
>>>>>> Deepak Dixit
>>>>>> www.hotwaxsystems.com
>>>>>>
>>>>>> On Sat, Apr 22, 2017 at 2:38 PM, Deepak Dixit
>>>>>> <deepak.dixit@hotwaxsystems.
>>>>>> com> wrote:
>>>>>>
>>>>>> Let me check Jacques
>>>>>>> Thanks & Regards
>>>>>>> --
>>>>>>> Deepak Dixit
>>>>>>> www.hotwaxsystems.com
>>>>>>>
>>>>>>> On Sat, Apr 22, 2017 at 2:35 PM, Jacques Le Roux <
>>>>>>> jacques.le.roux@les7arts.com> wrote:
>>>>>>>
>>>>>>> Hi Deepak,
>>>>>>>> Not sure which commit exactly, but since this one there are related
>>>>>>>> test
>>>>>>>> failures in trunk and R11 https://ci.apache.org/projects/ofbiz/logs/
>>>>>>>>
>>>>>>>> Thanks
>>>>>>>>
>>>>>>>> Jacques
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Le 22/04/2017 � 09:59, deepak@apache.org a �crit :
>>>>>>>>
>>>>>>>> Author: deepak
>>>>>>>>> Date: Sat Apr 22 07:59:45 2017
>>>>>>>>> New Revision: 1792270
>>>>>>>>>
>>>>>>>>> URL: http://svn.apache.org/viewvc?rev=1792270&view=rev
>>>>>>>>> Log:
>>>>>>>>> Improved: Converted create and remove QuoteRole service to
>>>>>>>>> entity-auto
>>>>>>>>> also added update and expire QuoteRole service.(OFBIZ-9331)
>>>>>>>>>
>>>>>>>>> Modified:
>>>>>>>>> ofbiz/ofbiz-framework/trunk/applications/order/minilang/quo
>>>>>>>>> te/QuoteServices.xml
>>>>>>>>> ofbiz/ofbiz-framework/trunk/applications/order/servicedef/s
>>>>>>>>> ervices_quote.xml
>>>>>>>>>
>>>>>>>>> Modified: ofbiz/ofbiz-framework/trunk/ap
>>>>>>>>> plications/order/minilang/quot
>>>>>>>>> e/QuoteServices.xml
>>>>>>>>> URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/app
>>>>>>>>> lications/order/minilang/quote/QuoteServices.xml?rev=1792270
>>>>>>>>> &r1=1792269&r2=1792270&view=diff
>>>>>>>>> ============================================================
>>>>>>>>> ==================
>>>>>>>>> --- ofbiz/ofbiz-framework/trunk/applications/order/minilang/quot
>>>>>>>>> e/QuoteServices.xml
>>>>>>>>> (original)
>>>>>>>>> +++ ofbiz/ofbiz-framework/trunk/applications/order/minilang/quot
>>>>>>>>> e/QuoteServices.xml
>>>>>>>>> Sat Apr 22 07:59:45 2017
>>>>>>>>> @@ -281,47 +281,6 @@ under the License.
>>>>>>>>>             <check-errors/>
>>>>>>>>>         </simple-method>
>>>>>>>>>     -    <!-- create a new QuoteRole -->
>>>>>>>>> -    <simple-method method-name="createQuoteRole"
>>>>>>>>> short-description="Create a QuoteRole">
>>>>>>>>> -        <check-permission permission="ORDERMGR" action="_CREATE">
>>>>>>>>> -            <fail-property resource="OrderErrorUiLabels"
>>>>>>>>> property="OrderErrorCreatePermissionError"/>
>>>>>>>>> -        </check-permission>
>>>>>>>>> -        <check-errors/>
>>>>>>>>> -        <set from-field="parameters.partyId"
>>>>>>>>> field="lookupPKMap.partyId"/>
>>>>>>>>> -        <set from-field="parameters.roleTypeId"
>>>>>>>>> field="lookupPKMap.roleTypeId"/>
>>>>>>>>> -        <find-by-primary-key entity-name="PartyRole"
>>>>>>>>> map="lookupPKMap"
>>>>>>>>> value-field="partyRole"/>
>>>>>>>>> -        <if-empty field="partyRole.partyId">
>>>>>>>>> -            <check-permission permission="PARTYMGR"
>>>>>>>>> action="_CREATE">
>>>>>>>>> -                <fail-property resource="OrderErrorUiLabels"
>>>>>>>>> property="OrderErrorCreatePermissionError"/>
>>>>>>>>> -            </check-permission>
>>>>>>>>> -            <check-permission permission="PARTYMGR"
>>>>>>>>> action="_UPDATE">
>>>>>>>>> -                <fail-property resource="OrderErrorUiLabels"
>>>>>>>>> property="OrderErrorCreatePermissionError"/>
>>>>>>>>> -            </check-permission>
>>>>>>>>> -            <check-errors/>
>>>>>>>>> -            <make-value value-field="partyRole"
>>>>>>>>> entity-name="PartyRole"/>
>>>>>>>>> -            <set-pk-fields map="lookupPKMap"
>>>>>>>>> value-field="partyRole"/>
>>>>>>>>> -            <create-value value-field="partyRole"/>
>>>>>>>>> -        </if-empty>
>>>>>>>>> -        <!-- create new entity and create all the fields -->
>>>>>>>>> -        <make-value value-field="newEntity"
>>>>>>>>> entity-name="QuoteRole"/>
>>>>>>>>> -        <set-pk-fields map="parameters" value-field="newEntity"/>
>>>>>>>>> -        <create-value value-field="newEntity"/>
>>>>>>>>> -        <property-to-field resource="OrderUiLabels"
>>>>>>>>> property="OrderOrderQuoteRoleAddedSuccessfully"
>>>>>>>>> field="successMessage"/>
>>>>>>>>> -        <check-errors/>
>>>>>>>>> -    </simple-method>
>>>>>>>>> -
>>>>>>>>> -    <!-- remove an existing QuoteRole -->
>>>>>>>>> -    <simple-method method-name="removeQuoteRole"
>>>>>>>>> short-description="Remove an existing QuoteRole">
>>>>>>>>> -        <check-permission permission="ORDERMGR" action="_DELETE">
>>>>>>>>> -            <fail-property resource="OrderErrorUiLabels"
>>>>>>>>> property="OrderErrorDeletePermissionError"/>
>>>>>>>>> -        </check-permission>
>>>>>>>>> -        <check-errors/>
>>>>>>>>> -        <entity-one entity-name="QuoteRole" value-field="quoteRole"
>>>>>>>>> auto-field-map="true"/>
>>>>>>>>> -        <check-errors/>
>>>>>>>>> -        <remove-value value-field="quoteRole"/>
>>>>>>>>> -        <check-errors/>
>>>>>>>>> -    </simple-method>
>>>>>>>>> -
>>>>>>>>>         <!-- create a new QuoteItem -->
>>>>>>>>>         <simple-method method-name="createQuoteItem"
>>>>>>>>> short-description="Create a QuoteItem">
>>>>>>>>>             <entity-one entity-name="Quote" value-field="quote"
>>>>>>>>> auto-field-map="true"/>
>>>>>>>>>
>>>>>>>>> Modified: ofbiz/ofbiz-framework/trunk/ap
>>>>>>>>> plications/order/servicedef/se
>>>>>>>>> rvices_quote.xml
>>>>>>>>> URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/app
>>>>>>>>> lications/order/servicedef/services_quote.xml?rev=1792270&r1
>>>>>>>>> =1792269&r2=1792270&view=diff
>>>>>>>>> ============================================================
>>>>>>>>> ==================
>>>>>>>>> --- ofbiz/ofbiz-framework/trunk/applications/order/servicedef/se
>>>>>>>>> rvices_quote.xml
>>>>>>>>> (original)
>>>>>>>>> +++ ofbiz/ofbiz-framework/trunk/applications/order/servicedef/se
>>>>>>>>> rvices_quote.xml
>>>>>>>>> Sat Apr 22 07:59:45 2017
>>>>>>>>> @@ -69,16 +69,37 @@ under the License.
>>>>>>>>>             <auto-attributes include="pk" mode="IN"
>>>>>>>>> optional="false"/>
>>>>>>>>>         </service>
>>>>>>>>>         <!-- QuoteRole  -->
>>>>>>>>> -    <service name="createQuoteRole" default-entity-name="QuoteRole
>>>>>>>>> "
>>>>>>>>> engine="simple"
>>>>>>>>> -                location="component://order/mi
>>>>>>>>> nilang/quote/QuoteServices.xml" invoke="createQuoteRole"
>>>>>>>>> auth="true">
>>>>>>>>> +    <service name="createQuoteRole" default-entity-name="QuoteRole
>>>>>>>>> "
>>>>>>>>> engine="entity-auto" invoke="create" auth="true">
>>>>>>>>>             <description>Create a QuoteRole</description>
>>>>>>>>> -        <auto-attributes include="pk" mode="INOUT"
>>>>>>>>> optional="true"/>
>>>>>>>>> +        <required-permissions join-type="AND">
>>>>>>>>> +            <check-permission permission="ORDERMGR"
>>>>>>>>> action="_CREATE"/>
>>>>>>>>> +        </required-permissions>
>>>>>>>>> +        <auto-attributes mode="IN" include="pk" />
>>>>>>>>> +        <auto-attributes mode="IN" include="nonpk"
>>>>>>>>> optional="true"/>
>>>>>>>>> +        <!-- make fromDate as optional for backward compatibility,
>>>>>>>>> EntityAuto engine automatically set the fromDate to nowTimestamp if
>>>>>>>>> its not
>>>>>>>>> missing-->
>>>>>>>>> +        <override name="fromDate" mode="IN" optional="true"/>
>>>>>>>>>         </service>
>>>>>>>>> -    <service name="removeQuoteRole" default-entity-name="QuoteRole
>>>>>>>>> "
>>>>>>>>> engine="simple"
>>>>>>>>> -                location="component://order/mi
>>>>>>>>> nilang/quote/QuoteServices.xml" invoke="removeQuoteRole"
>>>>>>>>> auth="true">
>>>>>>>>> +    <service name="updateQuoteRole" default-entity-name="QuoteRole
>>>>>>>>> "
>>>>>>>>> engine="entity-auto" invoke="update" auth="true">
>>>>>>>>> +        <description>Update a QuoteRole</description>
>>>>>>>>> +        <required-permissions join-type="AND">
>>>>>>>>> +            <check-permission permission="ORDERMGR"
>>>>>>>>> action="_UPDATE"/>
>>>>>>>>> +        </required-permissions>
>>>>>>>>> +        <auto-attributes mode="IN" include="pk" />
>>>>>>>>> +        <auto-attributes mode="IN" include="nonpk"
>>>>>>>>> optional="true"/>
>>>>>>>>> +    </service>
>>>>>>>>> +    <service name="removeQuoteRole" default-entity-name="QuoteRole
>>>>>>>>> "
>>>>>>>>> engine="entity-auto" invoke="delete" auth="true">
>>>>>>>>>             <description>Remove a QuoteRole</description>
>>>>>>>>> -        <auto-attributes include="pk" mode="INOUT"
>>>>>>>>> optional="true"/>
>>>>>>>>> -        <auto-attributes include="nonpk" mode="IN"
>>>>>>>>> optional="true"/>
>>>>>>>>> +        <required-permissions join-type="AND">
>>>>>>>>> +            <check-permission permission="ORDERMGR"
>>>>>>>>> action="_DELETE"/>
>>>>>>>>> +        </required-permissions>
>>>>>>>>> +        <auto-attributes include="pk" mode="IN" optional="false"/>
>>>>>>>>> +    </service>
>>>>>>>>> +    <service name="removeQuoteRole" default-entity-name="QuoteRole
>>>>>>>>> "
>>>>>>>>> engine="entity-auto" invoke="expire" auth="true">
>>>>>>>>> +        <description>Expire a QuoteRole</description>
>>>>>>>>> +        <required-permissions join-type="AND">
>>>>>>>>> +            <check-permission permission="ORDERMGR"
>>>>>>>>> action="_UPDATE"/>
>>>>>>>>> +        </required-permissions>
>>>>>>>>> +        <auto-attributes include="pk" mode="IN" optional="false"/>
>>>>>>>>>         </service>
>>>>>>>>>         <!-- QuoteItem  -->
>>>>>>>>>         <service name="createQuoteItem"
>>>>>>>>> default-entity-name="QuoteItem"
>>>>>>>>> engine="simple"
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>


Re: svn commit: r1792270 - in /ofbiz/ofbiz-framework/trunk/applications/order: minilang/quote/QuoteServices.xml servicedef/services_quote.xml

Posted by Deepak Dixit <de...@hotwaxsystems.com>.
Done at r#1792638  also backported to release 16.11
All test passed on local machine.

Its not an dirty fix there are some occurrence of ensurePartyRole as action
service in seca files.


Thanks & Regards
--
Deepak Dixit
www.hotwaxsystems.com

On Tue, Apr 25, 2017 at 11:40 PM, Deepak Dixit <
deepak.dixit@hotwaxsystems.com> wrote:

> Quick and dirty fix will be add and eca on createQuoteRole to
> ensurePartyRole.
> Let me run the test cases.
>
> Thanks & Regards
> --
> Deepak Dixit
> www.hotwaxsystems.com
>
> On Tue, Apr 25, 2017 at 11:06 PM, Jacques Le Roux <
> jacques.le.roux@les7arts.com> wrote:
>
>> Hi Deepak,
>>
>> Any chances since to fix, at least temporarily, the tests?
>>
>> Thanks
>>
>> Jacques
>>
>>
>>
>> Le 22/04/2017 à 12:07, Jacques Le Roux a écrit :
>>
>>> Thanks Deepak
>>>
>>>
>>> Le 22/04/2017 à 12:02, Deepak Dixit a écrit :
>>>
>>>> Need to fix some more test cases/service that are using createQuoteRole
>>>> service and assuming that it will crate party role if not exist.
>>>>
>>>> Thanks & Regards
>>>> --
>>>> Deepak Dixit
>>>> www.hotwaxsystems.com
>>>>
>>>> On Sat, Apr 22, 2017 at 3:03 PM, Deepak Dixit <
>>>> deepak.dixit@hotwaxsystems.com> wrote:
>>>>
>>>> Hi Jacques,
>>>>>
>>>>> Its due to testCreateQuoteRole test case, as we converted this into
>>>>> entity auto, so now onward this does not create PartyRole if its not
>>>>> exists.
>>>>>
>>>>> As its entity-auto service so there is no sense to keep the test case
>>>>> for
>>>>> this.
>>>>>
>>>>> Thanks & Regards
>>>>> --
>>>>> Deepak Dixit
>>>>> www.hotwaxsystems.com
>>>>>
>>>>> On Sat, Apr 22, 2017 at 2:38 PM, Deepak Dixit
>>>>> <deepak.dixit@hotwaxsystems.
>>>>> com> wrote:
>>>>>
>>>>> Let me check Jacques
>>>>>>
>>>>>> Thanks & Regards
>>>>>> --
>>>>>> Deepak Dixit
>>>>>> www.hotwaxsystems.com
>>>>>>
>>>>>> On Sat, Apr 22, 2017 at 2:35 PM, Jacques Le Roux <
>>>>>> jacques.le.roux@les7arts.com> wrote:
>>>>>>
>>>>>> Hi Deepak,
>>>>>>>
>>>>>>> Not sure which commit exactly, but since this one there are related
>>>>>>> test
>>>>>>> failures in trunk and R11 https://ci.apache.org/projects/ofbiz/logs/
>>>>>>>
>>>>>>> Thanks
>>>>>>>
>>>>>>> Jacques
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Le 22/04/2017 à 09:59, deepak@apache.org a écrit :
>>>>>>>
>>>>>>> Author: deepak
>>>>>>>> Date: Sat Apr 22 07:59:45 2017
>>>>>>>> New Revision: 1792270
>>>>>>>>
>>>>>>>> URL: http://svn.apache.org/viewvc?rev=1792270&view=rev
>>>>>>>> Log:
>>>>>>>> Improved: Converted create and remove QuoteRole service to
>>>>>>>> entity-auto
>>>>>>>> also added update and expire QuoteRole service.(OFBIZ-9331)
>>>>>>>>
>>>>>>>> Modified:
>>>>>>>> ofbiz/ofbiz-framework/trunk/applications/order/minilang/quo
>>>>>>>> te/QuoteServices.xml
>>>>>>>> ofbiz/ofbiz-framework/trunk/applications/order/servicedef/s
>>>>>>>> ervices_quote.xml
>>>>>>>>
>>>>>>>> Modified: ofbiz/ofbiz-framework/trunk/ap
>>>>>>>> plications/order/minilang/quot
>>>>>>>> e/QuoteServices.xml
>>>>>>>> URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/app
>>>>>>>> lications/order/minilang/quote/QuoteServices.xml?rev=1792270
>>>>>>>> &r1=1792269&r2=1792270&view=diff
>>>>>>>> ============================================================
>>>>>>>> ==================
>>>>>>>> --- ofbiz/ofbiz-framework/trunk/applications/order/minilang/quot
>>>>>>>> e/QuoteServices.xml
>>>>>>>> (original)
>>>>>>>> +++ ofbiz/ofbiz-framework/trunk/applications/order/minilang/quot
>>>>>>>> e/QuoteServices.xml
>>>>>>>> Sat Apr 22 07:59:45 2017
>>>>>>>> @@ -281,47 +281,6 @@ under the License.
>>>>>>>>            <check-errors/>
>>>>>>>>        </simple-method>
>>>>>>>>    -    <!-- create a new QuoteRole -->
>>>>>>>> -    <simple-method method-name="createQuoteRole"
>>>>>>>> short-description="Create a QuoteRole">
>>>>>>>> -        <check-permission permission="ORDERMGR" action="_CREATE">
>>>>>>>> -            <fail-property resource="OrderErrorUiLabels"
>>>>>>>> property="OrderErrorCreatePermissionError"/>
>>>>>>>> -        </check-permission>
>>>>>>>> -        <check-errors/>
>>>>>>>> -        <set from-field="parameters.partyId"
>>>>>>>> field="lookupPKMap.partyId"/>
>>>>>>>> -        <set from-field="parameters.roleTypeId"
>>>>>>>> field="lookupPKMap.roleTypeId"/>
>>>>>>>> -        <find-by-primary-key entity-name="PartyRole"
>>>>>>>> map="lookupPKMap"
>>>>>>>> value-field="partyRole"/>
>>>>>>>> -        <if-empty field="partyRole.partyId">
>>>>>>>> -            <check-permission permission="PARTYMGR"
>>>>>>>> action="_CREATE">
>>>>>>>> -                <fail-property resource="OrderErrorUiLabels"
>>>>>>>> property="OrderErrorCreatePermissionError"/>
>>>>>>>> -            </check-permission>
>>>>>>>> -            <check-permission permission="PARTYMGR"
>>>>>>>> action="_UPDATE">
>>>>>>>> -                <fail-property resource="OrderErrorUiLabels"
>>>>>>>> property="OrderErrorCreatePermissionError"/>
>>>>>>>> -            </check-permission>
>>>>>>>> -            <check-errors/>
>>>>>>>> -            <make-value value-field="partyRole"
>>>>>>>> entity-name="PartyRole"/>
>>>>>>>> -            <set-pk-fields map="lookupPKMap"
>>>>>>>> value-field="partyRole"/>
>>>>>>>> -            <create-value value-field="partyRole"/>
>>>>>>>> -        </if-empty>
>>>>>>>> -        <!-- create new entity and create all the fields -->
>>>>>>>> -        <make-value value-field="newEntity"
>>>>>>>> entity-name="QuoteRole"/>
>>>>>>>> -        <set-pk-fields map="parameters" value-field="newEntity"/>
>>>>>>>> -        <create-value value-field="newEntity"/>
>>>>>>>> -        <property-to-field resource="OrderUiLabels"
>>>>>>>> property="OrderOrderQuoteRoleAddedSuccessfully"
>>>>>>>> field="successMessage"/>
>>>>>>>> -        <check-errors/>
>>>>>>>> -    </simple-method>
>>>>>>>> -
>>>>>>>> -    <!-- remove an existing QuoteRole -->
>>>>>>>> -    <simple-method method-name="removeQuoteRole"
>>>>>>>> short-description="Remove an existing QuoteRole">
>>>>>>>> -        <check-permission permission="ORDERMGR" action="_DELETE">
>>>>>>>> -            <fail-property resource="OrderErrorUiLabels"
>>>>>>>> property="OrderErrorDeletePermissionError"/>
>>>>>>>> -        </check-permission>
>>>>>>>> -        <check-errors/>
>>>>>>>> -        <entity-one entity-name="QuoteRole" value-field="quoteRole"
>>>>>>>> auto-field-map="true"/>
>>>>>>>> -        <check-errors/>
>>>>>>>> -        <remove-value value-field="quoteRole"/>
>>>>>>>> -        <check-errors/>
>>>>>>>> -    </simple-method>
>>>>>>>> -
>>>>>>>>        <!-- create a new QuoteItem -->
>>>>>>>>        <simple-method method-name="createQuoteItem"
>>>>>>>> short-description="Create a QuoteItem">
>>>>>>>>            <entity-one entity-name="Quote" value-field="quote"
>>>>>>>> auto-field-map="true"/>
>>>>>>>>
>>>>>>>> Modified: ofbiz/ofbiz-framework/trunk/ap
>>>>>>>> plications/order/servicedef/se
>>>>>>>> rvices_quote.xml
>>>>>>>> URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/app
>>>>>>>> lications/order/servicedef/services_quote.xml?rev=1792270&r1
>>>>>>>> =1792269&r2=1792270&view=diff
>>>>>>>> ============================================================
>>>>>>>> ==================
>>>>>>>> --- ofbiz/ofbiz-framework/trunk/applications/order/servicedef/se
>>>>>>>> rvices_quote.xml
>>>>>>>> (original)
>>>>>>>> +++ ofbiz/ofbiz-framework/trunk/applications/order/servicedef/se
>>>>>>>> rvices_quote.xml
>>>>>>>> Sat Apr 22 07:59:45 2017
>>>>>>>> @@ -69,16 +69,37 @@ under the License.
>>>>>>>>            <auto-attributes include="pk" mode="IN"
>>>>>>>> optional="false"/>
>>>>>>>>        </service>
>>>>>>>>        <!-- QuoteRole  -->
>>>>>>>> -    <service name="createQuoteRole" default-entity-name="QuoteRole
>>>>>>>> "
>>>>>>>> engine="simple"
>>>>>>>> -                location="component://order/mi
>>>>>>>> nilang/quote/QuoteServices.xml" invoke="createQuoteRole"
>>>>>>>> auth="true">
>>>>>>>> +    <service name="createQuoteRole" default-entity-name="QuoteRole
>>>>>>>> "
>>>>>>>> engine="entity-auto" invoke="create" auth="true">
>>>>>>>>            <description>Create a QuoteRole</description>
>>>>>>>> -        <auto-attributes include="pk" mode="INOUT"
>>>>>>>> optional="true"/>
>>>>>>>> +        <required-permissions join-type="AND">
>>>>>>>> +            <check-permission permission="ORDERMGR"
>>>>>>>> action="_CREATE"/>
>>>>>>>> +        </required-permissions>
>>>>>>>> +        <auto-attributes mode="IN" include="pk" />
>>>>>>>> +        <auto-attributes mode="IN" include="nonpk"
>>>>>>>> optional="true"/>
>>>>>>>> +        <!-- make fromDate as optional for backward compatibility,
>>>>>>>> EntityAuto engine automatically set the fromDate to nowTimestamp if
>>>>>>>> its not
>>>>>>>> missing-->
>>>>>>>> +        <override name="fromDate" mode="IN" optional="true"/>
>>>>>>>>        </service>
>>>>>>>> -    <service name="removeQuoteRole" default-entity-name="QuoteRole
>>>>>>>> "
>>>>>>>> engine="simple"
>>>>>>>> -                location="component://order/mi
>>>>>>>> nilang/quote/QuoteServices.xml" invoke="removeQuoteRole"
>>>>>>>> auth="true">
>>>>>>>> +    <service name="updateQuoteRole" default-entity-name="QuoteRole
>>>>>>>> "
>>>>>>>> engine="entity-auto" invoke="update" auth="true">
>>>>>>>> +        <description>Update a QuoteRole</description>
>>>>>>>> +        <required-permissions join-type="AND">
>>>>>>>> +            <check-permission permission="ORDERMGR"
>>>>>>>> action="_UPDATE"/>
>>>>>>>> +        </required-permissions>
>>>>>>>> +        <auto-attributes mode="IN" include="pk" />
>>>>>>>> +        <auto-attributes mode="IN" include="nonpk"
>>>>>>>> optional="true"/>
>>>>>>>> +    </service>
>>>>>>>> +    <service name="removeQuoteRole" default-entity-name="QuoteRole
>>>>>>>> "
>>>>>>>> engine="entity-auto" invoke="delete" auth="true">
>>>>>>>>            <description>Remove a QuoteRole</description>
>>>>>>>> -        <auto-attributes include="pk" mode="INOUT"
>>>>>>>> optional="true"/>
>>>>>>>> -        <auto-attributes include="nonpk" mode="IN"
>>>>>>>> optional="true"/>
>>>>>>>> +        <required-permissions join-type="AND">
>>>>>>>> +            <check-permission permission="ORDERMGR"
>>>>>>>> action="_DELETE"/>
>>>>>>>> +        </required-permissions>
>>>>>>>> +        <auto-attributes include="pk" mode="IN" optional="false"/>
>>>>>>>> +    </service>
>>>>>>>> +    <service name="removeQuoteRole" default-entity-name="QuoteRole
>>>>>>>> "
>>>>>>>> engine="entity-auto" invoke="expire" auth="true">
>>>>>>>> +        <description>Expire a QuoteRole</description>
>>>>>>>> +        <required-permissions join-type="AND">
>>>>>>>> +            <check-permission permission="ORDERMGR"
>>>>>>>> action="_UPDATE"/>
>>>>>>>> +        </required-permissions>
>>>>>>>> +        <auto-attributes include="pk" mode="IN" optional="false"/>
>>>>>>>>        </service>
>>>>>>>>        <!-- QuoteItem  -->
>>>>>>>>        <service name="createQuoteItem"
>>>>>>>> default-entity-name="QuoteItem"
>>>>>>>> engine="simple"
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>
>>>
>>
>

Re: svn commit: r1792270 - in /ofbiz/ofbiz-framework/trunk/applications/order: minilang/quote/QuoteServices.xml servicedef/services_quote.xml

Posted by Deepak Dixit <de...@hotwaxsystems.com>.
Quick and dirty fix will be add and eca on createQuoteRole to
ensurePartyRole.
Let me run the test cases.

Thanks & Regards
--
Deepak Dixit
www.hotwaxsystems.com

On Tue, Apr 25, 2017 at 11:06 PM, Jacques Le Roux <
jacques.le.roux@les7arts.com> wrote:

> Hi Deepak,
>
> Any chances since to fix, at least temporarily, the tests?
>
> Thanks
>
> Jacques
>
>
>
> Le 22/04/2017 à 12:07, Jacques Le Roux a écrit :
>
>> Thanks Deepak
>>
>>
>> Le 22/04/2017 à 12:02, Deepak Dixit a écrit :
>>
>>> Need to fix some more test cases/service that are using createQuoteRole
>>> service and assuming that it will crate party role if not exist.
>>>
>>> Thanks & Regards
>>> --
>>> Deepak Dixit
>>> www.hotwaxsystems.com
>>>
>>> On Sat, Apr 22, 2017 at 3:03 PM, Deepak Dixit <
>>> deepak.dixit@hotwaxsystems.com> wrote:
>>>
>>> Hi Jacques,
>>>>
>>>> Its due to testCreateQuoteRole test case, as we converted this into
>>>> entity auto, so now onward this does not create PartyRole if its not
>>>> exists.
>>>>
>>>> As its entity-auto service so there is no sense to keep the test case
>>>> for
>>>> this.
>>>>
>>>> Thanks & Regards
>>>> --
>>>> Deepak Dixit
>>>> www.hotwaxsystems.com
>>>>
>>>> On Sat, Apr 22, 2017 at 2:38 PM, Deepak Dixit
>>>> <deepak.dixit@hotwaxsystems.
>>>> com> wrote:
>>>>
>>>> Let me check Jacques
>>>>>
>>>>> Thanks & Regards
>>>>> --
>>>>> Deepak Dixit
>>>>> www.hotwaxsystems.com
>>>>>
>>>>> On Sat, Apr 22, 2017 at 2:35 PM, Jacques Le Roux <
>>>>> jacques.le.roux@les7arts.com> wrote:
>>>>>
>>>>> Hi Deepak,
>>>>>>
>>>>>> Not sure which commit exactly, but since this one there are related
>>>>>> test
>>>>>> failures in trunk and R11 https://ci.apache.org/projects/ofbiz/logs/
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>> Jacques
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Le 22/04/2017 à 09:59, deepak@apache.org a écrit :
>>>>>>
>>>>>> Author: deepak
>>>>>>> Date: Sat Apr 22 07:59:45 2017
>>>>>>> New Revision: 1792270
>>>>>>>
>>>>>>> URL: http://svn.apache.org/viewvc?rev=1792270&view=rev
>>>>>>> Log:
>>>>>>> Improved: Converted create and remove QuoteRole service to
>>>>>>> entity-auto
>>>>>>> also added update and expire QuoteRole service.(OFBIZ-9331)
>>>>>>>
>>>>>>> Modified:
>>>>>>> ofbiz/ofbiz-framework/trunk/applications/order/minilang/quo
>>>>>>> te/QuoteServices.xml
>>>>>>> ofbiz/ofbiz-framework/trunk/applications/order/servicedef/s
>>>>>>> ervices_quote.xml
>>>>>>>
>>>>>>> Modified: ofbiz/ofbiz-framework/trunk/ap
>>>>>>> plications/order/minilang/quot
>>>>>>> e/QuoteServices.xml
>>>>>>> URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/app
>>>>>>> lications/order/minilang/quote/QuoteServices.xml?rev=1792270
>>>>>>> &r1=1792269&r2=1792270&view=diff
>>>>>>> ============================================================
>>>>>>> ==================
>>>>>>> --- ofbiz/ofbiz-framework/trunk/applications/order/minilang/quot
>>>>>>> e/QuoteServices.xml
>>>>>>> (original)
>>>>>>> +++ ofbiz/ofbiz-framework/trunk/applications/order/minilang/quot
>>>>>>> e/QuoteServices.xml
>>>>>>> Sat Apr 22 07:59:45 2017
>>>>>>> @@ -281,47 +281,6 @@ under the License.
>>>>>>>            <check-errors/>
>>>>>>>        </simple-method>
>>>>>>>    -    <!-- create a new QuoteRole -->
>>>>>>> -    <simple-method method-name="createQuoteRole"
>>>>>>> short-description="Create a QuoteRole">
>>>>>>> -        <check-permission permission="ORDERMGR" action="_CREATE">
>>>>>>> -            <fail-property resource="OrderErrorUiLabels"
>>>>>>> property="OrderErrorCreatePermissionError"/>
>>>>>>> -        </check-permission>
>>>>>>> -        <check-errors/>
>>>>>>> -        <set from-field="parameters.partyId"
>>>>>>> field="lookupPKMap.partyId"/>
>>>>>>> -        <set from-field="parameters.roleTypeId"
>>>>>>> field="lookupPKMap.roleTypeId"/>
>>>>>>> -        <find-by-primary-key entity-name="PartyRole"
>>>>>>> map="lookupPKMap"
>>>>>>> value-field="partyRole"/>
>>>>>>> -        <if-empty field="partyRole.partyId">
>>>>>>> -            <check-permission permission="PARTYMGR"
>>>>>>> action="_CREATE">
>>>>>>> -                <fail-property resource="OrderErrorUiLabels"
>>>>>>> property="OrderErrorCreatePermissionError"/>
>>>>>>> -            </check-permission>
>>>>>>> -            <check-permission permission="PARTYMGR"
>>>>>>> action="_UPDATE">
>>>>>>> -                <fail-property resource="OrderErrorUiLabels"
>>>>>>> property="OrderErrorCreatePermissionError"/>
>>>>>>> -            </check-permission>
>>>>>>> -            <check-errors/>
>>>>>>> -            <make-value value-field="partyRole"
>>>>>>> entity-name="PartyRole"/>
>>>>>>> -            <set-pk-fields map="lookupPKMap"
>>>>>>> value-field="partyRole"/>
>>>>>>> -            <create-value value-field="partyRole"/>
>>>>>>> -        </if-empty>
>>>>>>> -        <!-- create new entity and create all the fields -->
>>>>>>> -        <make-value value-field="newEntity"
>>>>>>> entity-name="QuoteRole"/>
>>>>>>> -        <set-pk-fields map="parameters" value-field="newEntity"/>
>>>>>>> -        <create-value value-field="newEntity"/>
>>>>>>> -        <property-to-field resource="OrderUiLabels"
>>>>>>> property="OrderOrderQuoteRoleAddedSuccessfully"
>>>>>>> field="successMessage"/>
>>>>>>> -        <check-errors/>
>>>>>>> -    </simple-method>
>>>>>>> -
>>>>>>> -    <!-- remove an existing QuoteRole -->
>>>>>>> -    <simple-method method-name="removeQuoteRole"
>>>>>>> short-description="Remove an existing QuoteRole">
>>>>>>> -        <check-permission permission="ORDERMGR" action="_DELETE">
>>>>>>> -            <fail-property resource="OrderErrorUiLabels"
>>>>>>> property="OrderErrorDeletePermissionError"/>
>>>>>>> -        </check-permission>
>>>>>>> -        <check-errors/>
>>>>>>> -        <entity-one entity-name="QuoteRole" value-field="quoteRole"
>>>>>>> auto-field-map="true"/>
>>>>>>> -        <check-errors/>
>>>>>>> -        <remove-value value-field="quoteRole"/>
>>>>>>> -        <check-errors/>
>>>>>>> -    </simple-method>
>>>>>>> -
>>>>>>>        <!-- create a new QuoteItem -->
>>>>>>>        <simple-method method-name="createQuoteItem"
>>>>>>> short-description="Create a QuoteItem">
>>>>>>>            <entity-one entity-name="Quote" value-field="quote"
>>>>>>> auto-field-map="true"/>
>>>>>>>
>>>>>>> Modified: ofbiz/ofbiz-framework/trunk/ap
>>>>>>> plications/order/servicedef/se
>>>>>>> rvices_quote.xml
>>>>>>> URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/app
>>>>>>> lications/order/servicedef/services_quote.xml?rev=1792270&r1
>>>>>>> =1792269&r2=1792270&view=diff
>>>>>>> ============================================================
>>>>>>> ==================
>>>>>>> --- ofbiz/ofbiz-framework/trunk/applications/order/servicedef/se
>>>>>>> rvices_quote.xml
>>>>>>> (original)
>>>>>>> +++ ofbiz/ofbiz-framework/trunk/applications/order/servicedef/se
>>>>>>> rvices_quote.xml
>>>>>>> Sat Apr 22 07:59:45 2017
>>>>>>> @@ -69,16 +69,37 @@ under the License.
>>>>>>>            <auto-attributes include="pk" mode="IN" optional="false"/>
>>>>>>>        </service>
>>>>>>>        <!-- QuoteRole  -->
>>>>>>> -    <service name="createQuoteRole" default-entity-name="QuoteRole"
>>>>>>> engine="simple"
>>>>>>> -                location="component://order/mi
>>>>>>> nilang/quote/QuoteServices.xml" invoke="createQuoteRole"
>>>>>>> auth="true">
>>>>>>> +    <service name="createQuoteRole" default-entity-name="QuoteRole"
>>>>>>> engine="entity-auto" invoke="create" auth="true">
>>>>>>>            <description>Create a QuoteRole</description>
>>>>>>> -        <auto-attributes include="pk" mode="INOUT" optional="true"/>
>>>>>>> +        <required-permissions join-type="AND">
>>>>>>> +            <check-permission permission="ORDERMGR"
>>>>>>> action="_CREATE"/>
>>>>>>> +        </required-permissions>
>>>>>>> +        <auto-attributes mode="IN" include="pk" />
>>>>>>> +        <auto-attributes mode="IN" include="nonpk" optional="true"/>
>>>>>>> +        <!-- make fromDate as optional for backward compatibility,
>>>>>>> EntityAuto engine automatically set the fromDate to nowTimestamp if
>>>>>>> its not
>>>>>>> missing-->
>>>>>>> +        <override name="fromDate" mode="IN" optional="true"/>
>>>>>>>        </service>
>>>>>>> -    <service name="removeQuoteRole" default-entity-name="QuoteRole"
>>>>>>> engine="simple"
>>>>>>> -                location="component://order/mi
>>>>>>> nilang/quote/QuoteServices.xml" invoke="removeQuoteRole"
>>>>>>> auth="true">
>>>>>>> +    <service name="updateQuoteRole" default-entity-name="QuoteRole"
>>>>>>> engine="entity-auto" invoke="update" auth="true">
>>>>>>> +        <description>Update a QuoteRole</description>
>>>>>>> +        <required-permissions join-type="AND">
>>>>>>> +            <check-permission permission="ORDERMGR"
>>>>>>> action="_UPDATE"/>
>>>>>>> +        </required-permissions>
>>>>>>> +        <auto-attributes mode="IN" include="pk" />
>>>>>>> +        <auto-attributes mode="IN" include="nonpk" optional="true"/>
>>>>>>> +    </service>
>>>>>>> +    <service name="removeQuoteRole" default-entity-name="QuoteRole"
>>>>>>> engine="entity-auto" invoke="delete" auth="true">
>>>>>>>            <description>Remove a QuoteRole</description>
>>>>>>> -        <auto-attributes include="pk" mode="INOUT" optional="true"/>
>>>>>>> -        <auto-attributes include="nonpk" mode="IN" optional="true"/>
>>>>>>> +        <required-permissions join-type="AND">
>>>>>>> +            <check-permission permission="ORDERMGR"
>>>>>>> action="_DELETE"/>
>>>>>>> +        </required-permissions>
>>>>>>> +        <auto-attributes include="pk" mode="IN" optional="false"/>
>>>>>>> +    </service>
>>>>>>> +    <service name="removeQuoteRole" default-entity-name="QuoteRole"
>>>>>>> engine="entity-auto" invoke="expire" auth="true">
>>>>>>> +        <description>Expire a QuoteRole</description>
>>>>>>> +        <required-permissions join-type="AND">
>>>>>>> +            <check-permission permission="ORDERMGR"
>>>>>>> action="_UPDATE"/>
>>>>>>> +        </required-permissions>
>>>>>>> +        <auto-attributes include="pk" mode="IN" optional="false"/>
>>>>>>>        </service>
>>>>>>>        <!-- QuoteItem  -->
>>>>>>>        <service name="createQuoteItem" default-entity-name="QuoteItem
>>>>>>> "
>>>>>>> engine="simple"
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>
>>
>

Re: svn commit: r1792270 - in /ofbiz/ofbiz-framework/trunk/applications/order: minilang/quote/QuoteServices.xml servicedef/services_quote.xml

Posted by Jacques Le Roux <ja...@les7arts.com>.
Hi Deepak,

Any chances since to fix, at least temporarily, the tests?

Thanks

Jacques


Le 22/04/2017 � 12:07, Jacques Le Roux a �crit :
> Thanks Deepak
>
>
> Le 22/04/2017 � 12:02, Deepak Dixit a �crit :
>> Need to fix some more test cases/service that are using createQuoteRole
>> service and assuming that it will crate party role if not exist.
>>
>> Thanks & Regards
>> -- 
>> Deepak Dixit
>> www.hotwaxsystems.com
>>
>> On Sat, Apr 22, 2017 at 3:03 PM, Deepak Dixit <
>> deepak.dixit@hotwaxsystems.com> wrote:
>>
>>> Hi Jacques,
>>>
>>> Its due to testCreateQuoteRole test case, as we converted this into
>>> entity auto, so now onward this does not create PartyRole if its not exists.
>>>
>>> As its entity-auto service so there is no sense to keep the test case for
>>> this.
>>>
>>> Thanks & Regards
>>> -- 
>>> Deepak Dixit
>>> www.hotwaxsystems.com
>>>
>>> On Sat, Apr 22, 2017 at 2:38 PM, Deepak Dixit <deepak.dixit@hotwaxsystems.
>>> com> wrote:
>>>
>>>> Let me check Jacques
>>>>
>>>> Thanks & Regards
>>>> -- 
>>>> Deepak Dixit
>>>> www.hotwaxsystems.com
>>>>
>>>> On Sat, Apr 22, 2017 at 2:35 PM, Jacques Le Roux <
>>>> jacques.le.roux@les7arts.com> wrote:
>>>>
>>>>> Hi Deepak,
>>>>>
>>>>> Not sure which commit exactly, but since this one there are related test
>>>>> failures in trunk and R11 https://ci.apache.org/projects/ofbiz/logs/
>>>>>
>>>>> Thanks
>>>>>
>>>>> Jacques
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Le 22/04/2017 � 09:59, deepak@apache.org a �crit :
>>>>>
>>>>>> Author: deepak
>>>>>> Date: Sat Apr 22 07:59:45 2017
>>>>>> New Revision: 1792270
>>>>>>
>>>>>> URL: http://svn.apache.org/viewvc?rev=1792270&view=rev
>>>>>> Log:
>>>>>> Improved: Converted create and remove QuoteRole service to entity-auto
>>>>>> also added update and expire QuoteRole service.(OFBIZ-9331)
>>>>>>
>>>>>> Modified:
>>>>>> ofbiz/ofbiz-framework/trunk/applications/order/minilang/quo
>>>>>> te/QuoteServices.xml
>>>>>> ofbiz/ofbiz-framework/trunk/applications/order/servicedef/s
>>>>>> ervices_quote.xml
>>>>>>
>>>>>> Modified: ofbiz/ofbiz-framework/trunk/applications/order/minilang/quot
>>>>>> e/QuoteServices.xml
>>>>>> URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/app
>>>>>> lications/order/minilang/quote/QuoteServices.xml?rev=1792270
>>>>>> &r1=1792269&r2=1792270&view=diff
>>>>>> ============================================================
>>>>>> ==================
>>>>>> --- ofbiz/ofbiz-framework/trunk/applications/order/minilang/quote/QuoteServices.xml
>>>>>> (original)
>>>>>> +++ ofbiz/ofbiz-framework/trunk/applications/order/minilang/quote/QuoteServices.xml
>>>>>> Sat Apr 22 07:59:45 2017
>>>>>> @@ -281,47 +281,6 @@ under the License.
>>>>>>            <check-errors/>
>>>>>>        </simple-method>
>>>>>>    -    <!-- create a new QuoteRole -->
>>>>>> -    <simple-method method-name="createQuoteRole"
>>>>>> short-description="Create a QuoteRole">
>>>>>> -        <check-permission permission="ORDERMGR" action="_CREATE">
>>>>>> -            <fail-property resource="OrderErrorUiLabels"
>>>>>> property="OrderErrorCreatePermissionError"/>
>>>>>> -        </check-permission>
>>>>>> -        <check-errors/>
>>>>>> -        <set from-field="parameters.partyId"
>>>>>> field="lookupPKMap.partyId"/>
>>>>>> -        <set from-field="parameters.roleTypeId"
>>>>>> field="lookupPKMap.roleTypeId"/>
>>>>>> -        <find-by-primary-key entity-name="PartyRole" map="lookupPKMap"
>>>>>> value-field="partyRole"/>
>>>>>> -        <if-empty field="partyRole.partyId">
>>>>>> -            <check-permission permission="PARTYMGR" action="_CREATE">
>>>>>> -                <fail-property resource="OrderErrorUiLabels"
>>>>>> property="OrderErrorCreatePermissionError"/>
>>>>>> -            </check-permission>
>>>>>> -            <check-permission permission="PARTYMGR" action="_UPDATE">
>>>>>> -                <fail-property resource="OrderErrorUiLabels"
>>>>>> property="OrderErrorCreatePermissionError"/>
>>>>>> -            </check-permission>
>>>>>> -            <check-errors/>
>>>>>> -            <make-value value-field="partyRole"
>>>>>> entity-name="PartyRole"/>
>>>>>> -            <set-pk-fields map="lookupPKMap" value-field="partyRole"/>
>>>>>> -            <create-value value-field="partyRole"/>
>>>>>> -        </if-empty>
>>>>>> -        <!-- create new entity and create all the fields -->
>>>>>> -        <make-value value-field="newEntity" entity-name="QuoteRole"/>
>>>>>> -        <set-pk-fields map="parameters" value-field="newEntity"/>
>>>>>> -        <create-value value-field="newEntity"/>
>>>>>> -        <property-to-field resource="OrderUiLabels"
>>>>>> property="OrderOrderQuoteRoleAddedSuccessfully"
>>>>>> field="successMessage"/>
>>>>>> -        <check-errors/>
>>>>>> -    </simple-method>
>>>>>> -
>>>>>> -    <!-- remove an existing QuoteRole -->
>>>>>> -    <simple-method method-name="removeQuoteRole"
>>>>>> short-description="Remove an existing QuoteRole">
>>>>>> -        <check-permission permission="ORDERMGR" action="_DELETE">
>>>>>> -            <fail-property resource="OrderErrorUiLabels"
>>>>>> property="OrderErrorDeletePermissionError"/>
>>>>>> -        </check-permission>
>>>>>> -        <check-errors/>
>>>>>> -        <entity-one entity-name="QuoteRole" value-field="quoteRole"
>>>>>> auto-field-map="true"/>
>>>>>> -        <check-errors/>
>>>>>> -        <remove-value value-field="quoteRole"/>
>>>>>> -        <check-errors/>
>>>>>> -    </simple-method>
>>>>>> -
>>>>>>        <!-- create a new QuoteItem -->
>>>>>>        <simple-method method-name="createQuoteItem"
>>>>>> short-description="Create a QuoteItem">
>>>>>>            <entity-one entity-name="Quote" value-field="quote"
>>>>>> auto-field-map="true"/>
>>>>>>
>>>>>> Modified: ofbiz/ofbiz-framework/trunk/applications/order/servicedef/se
>>>>>> rvices_quote.xml
>>>>>> URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/app
>>>>>> lications/order/servicedef/services_quote.xml?rev=1792270&r1
>>>>>> =1792269&r2=1792270&view=diff
>>>>>> ============================================================
>>>>>> ==================
>>>>>> --- ofbiz/ofbiz-framework/trunk/applications/order/servicedef/services_quote.xml
>>>>>> (original)
>>>>>> +++ ofbiz/ofbiz-framework/trunk/applications/order/servicedef/services_quote.xml
>>>>>> Sat Apr 22 07:59:45 2017
>>>>>> @@ -69,16 +69,37 @@ under the License.
>>>>>>            <auto-attributes include="pk" mode="IN" optional="false"/>
>>>>>>        </service>
>>>>>>        <!-- QuoteRole  -->
>>>>>> -    <service name="createQuoteRole" default-entity-name="QuoteRole"
>>>>>> engine="simple"
>>>>>> -                location="component://order/mi
>>>>>> nilang/quote/QuoteServices.xml" invoke="createQuoteRole" auth="true">
>>>>>> +    <service name="createQuoteRole" default-entity-name="QuoteRole"
>>>>>> engine="entity-auto" invoke="create" auth="true">
>>>>>>            <description>Create a QuoteRole</description>
>>>>>> -        <auto-attributes include="pk" mode="INOUT" optional="true"/>
>>>>>> +        <required-permissions join-type="AND">
>>>>>> +            <check-permission permission="ORDERMGR" action="_CREATE"/>
>>>>>> +        </required-permissions>
>>>>>> +        <auto-attributes mode="IN" include="pk" />
>>>>>> +        <auto-attributes mode="IN" include="nonpk" optional="true"/>
>>>>>> +        <!-- make fromDate as optional for backward compatibility,
>>>>>> EntityAuto engine automatically set the fromDate to nowTimestamp if its not
>>>>>> missing-->
>>>>>> +        <override name="fromDate" mode="IN" optional="true"/>
>>>>>>        </service>
>>>>>> -    <service name="removeQuoteRole" default-entity-name="QuoteRole"
>>>>>> engine="simple"
>>>>>> -                location="component://order/mi
>>>>>> nilang/quote/QuoteServices.xml" invoke="removeQuoteRole" auth="true">
>>>>>> +    <service name="updateQuoteRole" default-entity-name="QuoteRole"
>>>>>> engine="entity-auto" invoke="update" auth="true">
>>>>>> +        <description>Update a QuoteRole</description>
>>>>>> +        <required-permissions join-type="AND">
>>>>>> +            <check-permission permission="ORDERMGR" action="_UPDATE"/>
>>>>>> +        </required-permissions>
>>>>>> +        <auto-attributes mode="IN" include="pk" />
>>>>>> +        <auto-attributes mode="IN" include="nonpk" optional="true"/>
>>>>>> +    </service>
>>>>>> +    <service name="removeQuoteRole" default-entity-name="QuoteRole"
>>>>>> engine="entity-auto" invoke="delete" auth="true">
>>>>>>            <description>Remove a QuoteRole</description>
>>>>>> -        <auto-attributes include="pk" mode="INOUT" optional="true"/>
>>>>>> -        <auto-attributes include="nonpk" mode="IN" optional="true"/>
>>>>>> +        <required-permissions join-type="AND">
>>>>>> +            <check-permission permission="ORDERMGR" action="_DELETE"/>
>>>>>> +        </required-permissions>
>>>>>> +        <auto-attributes include="pk" mode="IN" optional="false"/>
>>>>>> +    </service>
>>>>>> +    <service name="removeQuoteRole" default-entity-name="QuoteRole"
>>>>>> engine="entity-auto" invoke="expire" auth="true">
>>>>>> +        <description>Expire a QuoteRole</description>
>>>>>> +        <required-permissions join-type="AND">
>>>>>> +            <check-permission permission="ORDERMGR" action="_UPDATE"/>
>>>>>> +        </required-permissions>
>>>>>> +        <auto-attributes include="pk" mode="IN" optional="false"/>
>>>>>>        </service>
>>>>>>        <!-- QuoteItem  -->
>>>>>>        <service name="createQuoteItem" default-entity-name="QuoteItem"
>>>>>> engine="simple"
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>
>


Re: svn commit: r1792270 - in /ofbiz/ofbiz-framework/trunk/applications/order: minilang/quote/QuoteServices.xml servicedef/services_quote.xml

Posted by Jacques Le Roux <ja...@les7arts.com>.
Thanks Deepak


Le 22/04/2017 � 12:02, Deepak Dixit a �crit :
> Need to fix some more test cases/service that are using createQuoteRole
> service and assuming that it will crate party role if not exist.
>
> Thanks & Regards
> --
> Deepak Dixit
> www.hotwaxsystems.com
>
> On Sat, Apr 22, 2017 at 3:03 PM, Deepak Dixit <
> deepak.dixit@hotwaxsystems.com> wrote:
>
>> Hi Jacques,
>>
>> Its due to testCreateQuoteRole test case, as we converted this into
>> entity auto, so now onward this does not create PartyRole if its not exists.
>>
>> As its entity-auto service so there is no sense to keep the test case for
>> this.
>>
>> Thanks & Regards
>> --
>> Deepak Dixit
>> www.hotwaxsystems.com
>>
>> On Sat, Apr 22, 2017 at 2:38 PM, Deepak Dixit <deepak.dixit@hotwaxsystems.
>> com> wrote:
>>
>>> Let me check Jacques
>>>
>>> Thanks & Regards
>>> --
>>> Deepak Dixit
>>> www.hotwaxsystems.com
>>>
>>> On Sat, Apr 22, 2017 at 2:35 PM, Jacques Le Roux <
>>> jacques.le.roux@les7arts.com> wrote:
>>>
>>>> Hi Deepak,
>>>>
>>>> Not sure which commit exactly, but since this one there are related test
>>>> failures in trunk and R11 https://ci.apache.org/projects/ofbiz/logs/
>>>>
>>>> Thanks
>>>>
>>>> Jacques
>>>>
>>>>
>>>>
>>>>
>>>> Le 22/04/2017 � 09:59, deepak@apache.org a �crit :
>>>>
>>>>> Author: deepak
>>>>> Date: Sat Apr 22 07:59:45 2017
>>>>> New Revision: 1792270
>>>>>
>>>>> URL: http://svn.apache.org/viewvc?rev=1792270&view=rev
>>>>> Log:
>>>>> Improved: Converted create and remove QuoteRole service to entity-auto
>>>>> also added update and expire QuoteRole service.(OFBIZ-9331)
>>>>>
>>>>> Modified:
>>>>>       ofbiz/ofbiz-framework/trunk/applications/order/minilang/quo
>>>>> te/QuoteServices.xml
>>>>>       ofbiz/ofbiz-framework/trunk/applications/order/servicedef/s
>>>>> ervices_quote.xml
>>>>>
>>>>> Modified: ofbiz/ofbiz-framework/trunk/applications/order/minilang/quot
>>>>> e/QuoteServices.xml
>>>>> URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/app
>>>>> lications/order/minilang/quote/QuoteServices.xml?rev=1792270
>>>>> &r1=1792269&r2=1792270&view=diff
>>>>> ============================================================
>>>>> ==================
>>>>> --- ofbiz/ofbiz-framework/trunk/applications/order/minilang/quote/QuoteServices.xml
>>>>> (original)
>>>>> +++ ofbiz/ofbiz-framework/trunk/applications/order/minilang/quote/QuoteServices.xml
>>>>> Sat Apr 22 07:59:45 2017
>>>>> @@ -281,47 +281,6 @@ under the License.
>>>>>            <check-errors/>
>>>>>        </simple-method>
>>>>>    -    <!-- create a new QuoteRole -->
>>>>> -    <simple-method method-name="createQuoteRole"
>>>>> short-description="Create a QuoteRole">
>>>>> -        <check-permission permission="ORDERMGR" action="_CREATE">
>>>>> -            <fail-property resource="OrderErrorUiLabels"
>>>>> property="OrderErrorCreatePermissionError"/>
>>>>> -        </check-permission>
>>>>> -        <check-errors/>
>>>>> -        <set from-field="parameters.partyId"
>>>>> field="lookupPKMap.partyId"/>
>>>>> -        <set from-field="parameters.roleTypeId"
>>>>> field="lookupPKMap.roleTypeId"/>
>>>>> -        <find-by-primary-key entity-name="PartyRole" map="lookupPKMap"
>>>>> value-field="partyRole"/>
>>>>> -        <if-empty field="partyRole.partyId">
>>>>> -            <check-permission permission="PARTYMGR" action="_CREATE">
>>>>> -                <fail-property resource="OrderErrorUiLabels"
>>>>> property="OrderErrorCreatePermissionError"/>
>>>>> -            </check-permission>
>>>>> -            <check-permission permission="PARTYMGR" action="_UPDATE">
>>>>> -                <fail-property resource="OrderErrorUiLabels"
>>>>> property="OrderErrorCreatePermissionError"/>
>>>>> -            </check-permission>
>>>>> -            <check-errors/>
>>>>> -            <make-value value-field="partyRole"
>>>>> entity-name="PartyRole"/>
>>>>> -            <set-pk-fields map="lookupPKMap" value-field="partyRole"/>
>>>>> -            <create-value value-field="partyRole"/>
>>>>> -        </if-empty>
>>>>> -        <!-- create new entity and create all the fields -->
>>>>> -        <make-value value-field="newEntity" entity-name="QuoteRole"/>
>>>>> -        <set-pk-fields map="parameters" value-field="newEntity"/>
>>>>> -        <create-value value-field="newEntity"/>
>>>>> -        <property-to-field resource="OrderUiLabels"
>>>>> property="OrderOrderQuoteRoleAddedSuccessfully"
>>>>> field="successMessage"/>
>>>>> -        <check-errors/>
>>>>> -    </simple-method>
>>>>> -
>>>>> -    <!-- remove an existing QuoteRole -->
>>>>> -    <simple-method method-name="removeQuoteRole"
>>>>> short-description="Remove an existing QuoteRole">
>>>>> -        <check-permission permission="ORDERMGR" action="_DELETE">
>>>>> -            <fail-property resource="OrderErrorUiLabels"
>>>>> property="OrderErrorDeletePermissionError"/>
>>>>> -        </check-permission>
>>>>> -        <check-errors/>
>>>>> -        <entity-one entity-name="QuoteRole" value-field="quoteRole"
>>>>> auto-field-map="true"/>
>>>>> -        <check-errors/>
>>>>> -        <remove-value value-field="quoteRole"/>
>>>>> -        <check-errors/>
>>>>> -    </simple-method>
>>>>> -
>>>>>        <!-- create a new QuoteItem -->
>>>>>        <simple-method method-name="createQuoteItem"
>>>>> short-description="Create a QuoteItem">
>>>>>            <entity-one entity-name="Quote" value-field="quote"
>>>>> auto-field-map="true"/>
>>>>>
>>>>> Modified: ofbiz/ofbiz-framework/trunk/applications/order/servicedef/se
>>>>> rvices_quote.xml
>>>>> URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/app
>>>>> lications/order/servicedef/services_quote.xml?rev=1792270&r1
>>>>> =1792269&r2=1792270&view=diff
>>>>> ============================================================
>>>>> ==================
>>>>> --- ofbiz/ofbiz-framework/trunk/applications/order/servicedef/services_quote.xml
>>>>> (original)
>>>>> +++ ofbiz/ofbiz-framework/trunk/applications/order/servicedef/services_quote.xml
>>>>> Sat Apr 22 07:59:45 2017
>>>>> @@ -69,16 +69,37 @@ under the License.
>>>>>            <auto-attributes include="pk" mode="IN" optional="false"/>
>>>>>        </service>
>>>>>        <!-- QuoteRole  -->
>>>>> -    <service name="createQuoteRole" default-entity-name="QuoteRole"
>>>>> engine="simple"
>>>>> -                location="component://order/mi
>>>>> nilang/quote/QuoteServices.xml" invoke="createQuoteRole" auth="true">
>>>>> +    <service name="createQuoteRole" default-entity-name="QuoteRole"
>>>>> engine="entity-auto" invoke="create" auth="true">
>>>>>            <description>Create a QuoteRole</description>
>>>>> -        <auto-attributes include="pk" mode="INOUT" optional="true"/>
>>>>> +        <required-permissions join-type="AND">
>>>>> +            <check-permission permission="ORDERMGR" action="_CREATE"/>
>>>>> +        </required-permissions>
>>>>> +        <auto-attributes mode="IN" include="pk" />
>>>>> +        <auto-attributes mode="IN" include="nonpk" optional="true"/>
>>>>> +        <!-- make fromDate as optional for backward compatibility,
>>>>> EntityAuto engine automatically set the fromDate to nowTimestamp if its not
>>>>> missing-->
>>>>> +        <override name="fromDate" mode="IN" optional="true"/>
>>>>>        </service>
>>>>> -    <service name="removeQuoteRole" default-entity-name="QuoteRole"
>>>>> engine="simple"
>>>>> -                location="component://order/mi
>>>>> nilang/quote/QuoteServices.xml" invoke="removeQuoteRole" auth="true">
>>>>> +    <service name="updateQuoteRole" default-entity-name="QuoteRole"
>>>>> engine="entity-auto" invoke="update" auth="true">
>>>>> +        <description>Update a QuoteRole</description>
>>>>> +        <required-permissions join-type="AND">
>>>>> +            <check-permission permission="ORDERMGR" action="_UPDATE"/>
>>>>> +        </required-permissions>
>>>>> +        <auto-attributes mode="IN" include="pk" />
>>>>> +        <auto-attributes mode="IN" include="nonpk" optional="true"/>
>>>>> +    </service>
>>>>> +    <service name="removeQuoteRole" default-entity-name="QuoteRole"
>>>>> engine="entity-auto" invoke="delete" auth="true">
>>>>>            <description>Remove a QuoteRole</description>
>>>>> -        <auto-attributes include="pk" mode="INOUT" optional="true"/>
>>>>> -        <auto-attributes include="nonpk" mode="IN" optional="true"/>
>>>>> +        <required-permissions join-type="AND">
>>>>> +            <check-permission permission="ORDERMGR" action="_DELETE"/>
>>>>> +        </required-permissions>
>>>>> +        <auto-attributes include="pk" mode="IN" optional="false"/>
>>>>> +    </service>
>>>>> +    <service name="removeQuoteRole" default-entity-name="QuoteRole"
>>>>> engine="entity-auto" invoke="expire" auth="true">
>>>>> +        <description>Expire a QuoteRole</description>
>>>>> +        <required-permissions join-type="AND">
>>>>> +            <check-permission permission="ORDERMGR" action="_UPDATE"/>
>>>>> +        </required-permissions>
>>>>> +        <auto-attributes include="pk" mode="IN" optional="false"/>
>>>>>        </service>
>>>>>        <!-- QuoteItem  -->
>>>>>        <service name="createQuoteItem" default-entity-name="QuoteItem"
>>>>> engine="simple"
>>>>>
>>>>>
>>>>>
>>>>>


Re: svn commit: r1792270 - in /ofbiz/ofbiz-framework/trunk/applications/order: minilang/quote/QuoteServices.xml servicedef/services_quote.xml

Posted by Deepak Dixit <de...@hotwaxsystems.com>.
Need to fix some more test cases/service that are using createQuoteRole
service and assuming that it will crate party role if not exist.

Thanks & Regards
--
Deepak Dixit
www.hotwaxsystems.com

On Sat, Apr 22, 2017 at 3:03 PM, Deepak Dixit <
deepak.dixit@hotwaxsystems.com> wrote:

> Hi Jacques,
>
> Its due to testCreateQuoteRole test case, as we converted this into
> entity auto, so now onward this does not create PartyRole if its not exists.
>
> As its entity-auto service so there is no sense to keep the test case for
> this.
>
> Thanks & Regards
> --
> Deepak Dixit
> www.hotwaxsystems.com
>
> On Sat, Apr 22, 2017 at 2:38 PM, Deepak Dixit <deepak.dixit@hotwaxsystems.
> com> wrote:
>
>> Let me check Jacques
>>
>> Thanks & Regards
>> --
>> Deepak Dixit
>> www.hotwaxsystems.com
>>
>> On Sat, Apr 22, 2017 at 2:35 PM, Jacques Le Roux <
>> jacques.le.roux@les7arts.com> wrote:
>>
>>> Hi Deepak,
>>>
>>> Not sure which commit exactly, but since this one there are related test
>>> failures in trunk and R11 https://ci.apache.org/projects/ofbiz/logs/
>>>
>>> Thanks
>>>
>>> Jacques
>>>
>>>
>>>
>>>
>>> Le 22/04/2017 à 09:59, deepak@apache.org a écrit :
>>>
>>>> Author: deepak
>>>> Date: Sat Apr 22 07:59:45 2017
>>>> New Revision: 1792270
>>>>
>>>> URL: http://svn.apache.org/viewvc?rev=1792270&view=rev
>>>> Log:
>>>> Improved: Converted create and remove QuoteRole service to entity-auto
>>>> also added update and expire QuoteRole service.(OFBIZ-9331)
>>>>
>>>> Modified:
>>>>      ofbiz/ofbiz-framework/trunk/applications/order/minilang/quo
>>>> te/QuoteServices.xml
>>>>      ofbiz/ofbiz-framework/trunk/applications/order/servicedef/s
>>>> ervices_quote.xml
>>>>
>>>> Modified: ofbiz/ofbiz-framework/trunk/applications/order/minilang/quot
>>>> e/QuoteServices.xml
>>>> URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/app
>>>> lications/order/minilang/quote/QuoteServices.xml?rev=1792270
>>>> &r1=1792269&r2=1792270&view=diff
>>>> ============================================================
>>>> ==================
>>>> --- ofbiz/ofbiz-framework/trunk/applications/order/minilang/quote/QuoteServices.xml
>>>> (original)
>>>> +++ ofbiz/ofbiz-framework/trunk/applications/order/minilang/quote/QuoteServices.xml
>>>> Sat Apr 22 07:59:45 2017
>>>> @@ -281,47 +281,6 @@ under the License.
>>>>           <check-errors/>
>>>>       </simple-method>
>>>>   -    <!-- create a new QuoteRole -->
>>>> -    <simple-method method-name="createQuoteRole"
>>>> short-description="Create a QuoteRole">
>>>> -        <check-permission permission="ORDERMGR" action="_CREATE">
>>>> -            <fail-property resource="OrderErrorUiLabels"
>>>> property="OrderErrorCreatePermissionError"/>
>>>> -        </check-permission>
>>>> -        <check-errors/>
>>>> -        <set from-field="parameters.partyId"
>>>> field="lookupPKMap.partyId"/>
>>>> -        <set from-field="parameters.roleTypeId"
>>>> field="lookupPKMap.roleTypeId"/>
>>>> -        <find-by-primary-key entity-name="PartyRole" map="lookupPKMap"
>>>> value-field="partyRole"/>
>>>> -        <if-empty field="partyRole.partyId">
>>>> -            <check-permission permission="PARTYMGR" action="_CREATE">
>>>> -                <fail-property resource="OrderErrorUiLabels"
>>>> property="OrderErrorCreatePermissionError"/>
>>>> -            </check-permission>
>>>> -            <check-permission permission="PARTYMGR" action="_UPDATE">
>>>> -                <fail-property resource="OrderErrorUiLabels"
>>>> property="OrderErrorCreatePermissionError"/>
>>>> -            </check-permission>
>>>> -            <check-errors/>
>>>> -            <make-value value-field="partyRole"
>>>> entity-name="PartyRole"/>
>>>> -            <set-pk-fields map="lookupPKMap" value-field="partyRole"/>
>>>> -            <create-value value-field="partyRole"/>
>>>> -        </if-empty>
>>>> -        <!-- create new entity and create all the fields -->
>>>> -        <make-value value-field="newEntity" entity-name="QuoteRole"/>
>>>> -        <set-pk-fields map="parameters" value-field="newEntity"/>
>>>> -        <create-value value-field="newEntity"/>
>>>> -        <property-to-field resource="OrderUiLabels"
>>>> property="OrderOrderQuoteRoleAddedSuccessfully"
>>>> field="successMessage"/>
>>>> -        <check-errors/>
>>>> -    </simple-method>
>>>> -
>>>> -    <!-- remove an existing QuoteRole -->
>>>> -    <simple-method method-name="removeQuoteRole"
>>>> short-description="Remove an existing QuoteRole">
>>>> -        <check-permission permission="ORDERMGR" action="_DELETE">
>>>> -            <fail-property resource="OrderErrorUiLabels"
>>>> property="OrderErrorDeletePermissionError"/>
>>>> -        </check-permission>
>>>> -        <check-errors/>
>>>> -        <entity-one entity-name="QuoteRole" value-field="quoteRole"
>>>> auto-field-map="true"/>
>>>> -        <check-errors/>
>>>> -        <remove-value value-field="quoteRole"/>
>>>> -        <check-errors/>
>>>> -    </simple-method>
>>>> -
>>>>       <!-- create a new QuoteItem -->
>>>>       <simple-method method-name="createQuoteItem"
>>>> short-description="Create a QuoteItem">
>>>>           <entity-one entity-name="Quote" value-field="quote"
>>>> auto-field-map="true"/>
>>>>
>>>> Modified: ofbiz/ofbiz-framework/trunk/applications/order/servicedef/se
>>>> rvices_quote.xml
>>>> URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/app
>>>> lications/order/servicedef/services_quote.xml?rev=1792270&r1
>>>> =1792269&r2=1792270&view=diff
>>>> ============================================================
>>>> ==================
>>>> --- ofbiz/ofbiz-framework/trunk/applications/order/servicedef/services_quote.xml
>>>> (original)
>>>> +++ ofbiz/ofbiz-framework/trunk/applications/order/servicedef/services_quote.xml
>>>> Sat Apr 22 07:59:45 2017
>>>> @@ -69,16 +69,37 @@ under the License.
>>>>           <auto-attributes include="pk" mode="IN" optional="false"/>
>>>>       </service>
>>>>       <!-- QuoteRole  -->
>>>> -    <service name="createQuoteRole" default-entity-name="QuoteRole"
>>>> engine="simple"
>>>> -                location="component://order/mi
>>>> nilang/quote/QuoteServices.xml" invoke="createQuoteRole" auth="true">
>>>> +    <service name="createQuoteRole" default-entity-name="QuoteRole"
>>>> engine="entity-auto" invoke="create" auth="true">
>>>>           <description>Create a QuoteRole</description>
>>>> -        <auto-attributes include="pk" mode="INOUT" optional="true"/>
>>>> +        <required-permissions join-type="AND">
>>>> +            <check-permission permission="ORDERMGR" action="_CREATE"/>
>>>> +        </required-permissions>
>>>> +        <auto-attributes mode="IN" include="pk" />
>>>> +        <auto-attributes mode="IN" include="nonpk" optional="true"/>
>>>> +        <!-- make fromDate as optional for backward compatibility,
>>>> EntityAuto engine automatically set the fromDate to nowTimestamp if its not
>>>> missing-->
>>>> +        <override name="fromDate" mode="IN" optional="true"/>
>>>>       </service>
>>>> -    <service name="removeQuoteRole" default-entity-name="QuoteRole"
>>>> engine="simple"
>>>> -                location="component://order/mi
>>>> nilang/quote/QuoteServices.xml" invoke="removeQuoteRole" auth="true">
>>>> +    <service name="updateQuoteRole" default-entity-name="QuoteRole"
>>>> engine="entity-auto" invoke="update" auth="true">
>>>> +        <description>Update a QuoteRole</description>
>>>> +        <required-permissions join-type="AND">
>>>> +            <check-permission permission="ORDERMGR" action="_UPDATE"/>
>>>> +        </required-permissions>
>>>> +        <auto-attributes mode="IN" include="pk" />
>>>> +        <auto-attributes mode="IN" include="nonpk" optional="true"/>
>>>> +    </service>
>>>> +    <service name="removeQuoteRole" default-entity-name="QuoteRole"
>>>> engine="entity-auto" invoke="delete" auth="true">
>>>>           <description>Remove a QuoteRole</description>
>>>> -        <auto-attributes include="pk" mode="INOUT" optional="true"/>
>>>> -        <auto-attributes include="nonpk" mode="IN" optional="true"/>
>>>> +        <required-permissions join-type="AND">
>>>> +            <check-permission permission="ORDERMGR" action="_DELETE"/>
>>>> +        </required-permissions>
>>>> +        <auto-attributes include="pk" mode="IN" optional="false"/>
>>>> +    </service>
>>>> +    <service name="removeQuoteRole" default-entity-name="QuoteRole"
>>>> engine="entity-auto" invoke="expire" auth="true">
>>>> +        <description>Expire a QuoteRole</description>
>>>> +        <required-permissions join-type="AND">
>>>> +            <check-permission permission="ORDERMGR" action="_UPDATE"/>
>>>> +        </required-permissions>
>>>> +        <auto-attributes include="pk" mode="IN" optional="false"/>
>>>>       </service>
>>>>       <!-- QuoteItem  -->
>>>>       <service name="createQuoteItem" default-entity-name="QuoteItem"
>>>> engine="simple"
>>>>
>>>>
>>>>
>>>>
>>>
>>
>

Re: svn commit: r1792270 - in /ofbiz/ofbiz-framework/trunk/applications/order: minilang/quote/QuoteServices.xml servicedef/services_quote.xml

Posted by Deepak Dixit <de...@hotwaxsystems.com>.
Hi Jacques,

Its due to testCreateQuoteRole test case, as we converted this into entity
auto, so now onward this does not create PartyRole if its not exists.

As its entity-auto service so there is no sense to keep the test case for
this.

Thanks & Regards
--
Deepak Dixit
www.hotwaxsystems.com

On Sat, Apr 22, 2017 at 2:38 PM, Deepak Dixit <
deepak.dixit@hotwaxsystems.com> wrote:

> Let me check Jacques
>
> Thanks & Regards
> --
> Deepak Dixit
> www.hotwaxsystems.com
>
> On Sat, Apr 22, 2017 at 2:35 PM, Jacques Le Roux <
> jacques.le.roux@les7arts.com> wrote:
>
>> Hi Deepak,
>>
>> Not sure which commit exactly, but since this one there are related test
>> failures in trunk and R11 https://ci.apache.org/projects/ofbiz/logs/
>>
>> Thanks
>>
>> Jacques
>>
>>
>>
>>
>> Le 22/04/2017 à 09:59, deepak@apache.org a écrit :
>>
>>> Author: deepak
>>> Date: Sat Apr 22 07:59:45 2017
>>> New Revision: 1792270
>>>
>>> URL: http://svn.apache.org/viewvc?rev=1792270&view=rev
>>> Log:
>>> Improved: Converted create and remove QuoteRole service to entity-auto
>>> also added update and expire QuoteRole service.(OFBIZ-9331)
>>>
>>> Modified:
>>>      ofbiz/ofbiz-framework/trunk/applications/order/minilang/quo
>>> te/QuoteServices.xml
>>>      ofbiz/ofbiz-framework/trunk/applications/order/servicedef/s
>>> ervices_quote.xml
>>>
>>> Modified: ofbiz/ofbiz-framework/trunk/applications/order/minilang/quot
>>> e/QuoteServices.xml
>>> URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/app
>>> lications/order/minilang/quote/QuoteServices.xml?rev=1792270
>>> &r1=1792269&r2=1792270&view=diff
>>> ============================================================
>>> ==================
>>> --- ofbiz/ofbiz-framework/trunk/applications/order/minilang/quote/QuoteServices.xml
>>> (original)
>>> +++ ofbiz/ofbiz-framework/trunk/applications/order/minilang/quote/QuoteServices.xml
>>> Sat Apr 22 07:59:45 2017
>>> @@ -281,47 +281,6 @@ under the License.
>>>           <check-errors/>
>>>       </simple-method>
>>>   -    <!-- create a new QuoteRole -->
>>> -    <simple-method method-name="createQuoteRole"
>>> short-description="Create a QuoteRole">
>>> -        <check-permission permission="ORDERMGR" action="_CREATE">
>>> -            <fail-property resource="OrderErrorUiLabels"
>>> property="OrderErrorCreatePermissionError"/>
>>> -        </check-permission>
>>> -        <check-errors/>
>>> -        <set from-field="parameters.partyId"
>>> field="lookupPKMap.partyId"/>
>>> -        <set from-field="parameters.roleTypeId"
>>> field="lookupPKMap.roleTypeId"/>
>>> -        <find-by-primary-key entity-name="PartyRole" map="lookupPKMap"
>>> value-field="partyRole"/>
>>> -        <if-empty field="partyRole.partyId">
>>> -            <check-permission permission="PARTYMGR" action="_CREATE">
>>> -                <fail-property resource="OrderErrorUiLabels"
>>> property="OrderErrorCreatePermissionError"/>
>>> -            </check-permission>
>>> -            <check-permission permission="PARTYMGR" action="_UPDATE">
>>> -                <fail-property resource="OrderErrorUiLabels"
>>> property="OrderErrorCreatePermissionError"/>
>>> -            </check-permission>
>>> -            <check-errors/>
>>> -            <make-value value-field="partyRole"
>>> entity-name="PartyRole"/>
>>> -            <set-pk-fields map="lookupPKMap" value-field="partyRole"/>
>>> -            <create-value value-field="partyRole"/>
>>> -        </if-empty>
>>> -        <!-- create new entity and create all the fields -->
>>> -        <make-value value-field="newEntity" entity-name="QuoteRole"/>
>>> -        <set-pk-fields map="parameters" value-field="newEntity"/>
>>> -        <create-value value-field="newEntity"/>
>>> -        <property-to-field resource="OrderUiLabels"
>>> property="OrderOrderQuoteRoleAddedSuccessfully" field="successMessage"/>
>>> -        <check-errors/>
>>> -    </simple-method>
>>> -
>>> -    <!-- remove an existing QuoteRole -->
>>> -    <simple-method method-name="removeQuoteRole"
>>> short-description="Remove an existing QuoteRole">
>>> -        <check-permission permission="ORDERMGR" action="_DELETE">
>>> -            <fail-property resource="OrderErrorUiLabels"
>>> property="OrderErrorDeletePermissionError"/>
>>> -        </check-permission>
>>> -        <check-errors/>
>>> -        <entity-one entity-name="QuoteRole" value-field="quoteRole"
>>> auto-field-map="true"/>
>>> -        <check-errors/>
>>> -        <remove-value value-field="quoteRole"/>
>>> -        <check-errors/>
>>> -    </simple-method>
>>> -
>>>       <!-- create a new QuoteItem -->
>>>       <simple-method method-name="createQuoteItem"
>>> short-description="Create a QuoteItem">
>>>           <entity-one entity-name="Quote" value-field="quote"
>>> auto-field-map="true"/>
>>>
>>> Modified: ofbiz/ofbiz-framework/trunk/applications/order/servicedef/se
>>> rvices_quote.xml
>>> URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/app
>>> lications/order/servicedef/services_quote.xml?rev=1792270&r1
>>> =1792269&r2=1792270&view=diff
>>> ============================================================
>>> ==================
>>> --- ofbiz/ofbiz-framework/trunk/applications/order/servicedef/services_quote.xml
>>> (original)
>>> +++ ofbiz/ofbiz-framework/trunk/applications/order/servicedef/services_quote.xml
>>> Sat Apr 22 07:59:45 2017
>>> @@ -69,16 +69,37 @@ under the License.
>>>           <auto-attributes include="pk" mode="IN" optional="false"/>
>>>       </service>
>>>       <!-- QuoteRole  -->
>>> -    <service name="createQuoteRole" default-entity-name="QuoteRole"
>>> engine="simple"
>>> -                location="component://order/mi
>>> nilang/quote/QuoteServices.xml" invoke="createQuoteRole" auth="true">
>>> +    <service name="createQuoteRole" default-entity-name="QuoteRole"
>>> engine="entity-auto" invoke="create" auth="true">
>>>           <description>Create a QuoteRole</description>
>>> -        <auto-attributes include="pk" mode="INOUT" optional="true"/>
>>> +        <required-permissions join-type="AND">
>>> +            <check-permission permission="ORDERMGR" action="_CREATE"/>
>>> +        </required-permissions>
>>> +        <auto-attributes mode="IN" include="pk" />
>>> +        <auto-attributes mode="IN" include="nonpk" optional="true"/>
>>> +        <!-- make fromDate as optional for backward compatibility,
>>> EntityAuto engine automatically set the fromDate to nowTimestamp if its not
>>> missing-->
>>> +        <override name="fromDate" mode="IN" optional="true"/>
>>>       </service>
>>> -    <service name="removeQuoteRole" default-entity-name="QuoteRole"
>>> engine="simple"
>>> -                location="component://order/mi
>>> nilang/quote/QuoteServices.xml" invoke="removeQuoteRole" auth="true">
>>> +    <service name="updateQuoteRole" default-entity-name="QuoteRole"
>>> engine="entity-auto" invoke="update" auth="true">
>>> +        <description>Update a QuoteRole</description>
>>> +        <required-permissions join-type="AND">
>>> +            <check-permission permission="ORDERMGR" action="_UPDATE"/>
>>> +        </required-permissions>
>>> +        <auto-attributes mode="IN" include="pk" />
>>> +        <auto-attributes mode="IN" include="nonpk" optional="true"/>
>>> +    </service>
>>> +    <service name="removeQuoteRole" default-entity-name="QuoteRole"
>>> engine="entity-auto" invoke="delete" auth="true">
>>>           <description>Remove a QuoteRole</description>
>>> -        <auto-attributes include="pk" mode="INOUT" optional="true"/>
>>> -        <auto-attributes include="nonpk" mode="IN" optional="true"/>
>>> +        <required-permissions join-type="AND">
>>> +            <check-permission permission="ORDERMGR" action="_DELETE"/>
>>> +        </required-permissions>
>>> +        <auto-attributes include="pk" mode="IN" optional="false"/>
>>> +    </service>
>>> +    <service name="removeQuoteRole" default-entity-name="QuoteRole"
>>> engine="entity-auto" invoke="expire" auth="true">
>>> +        <description>Expire a QuoteRole</description>
>>> +        <required-permissions join-type="AND">
>>> +            <check-permission permission="ORDERMGR" action="_UPDATE"/>
>>> +        </required-permissions>
>>> +        <auto-attributes include="pk" mode="IN" optional="false"/>
>>>       </service>
>>>       <!-- QuoteItem  -->
>>>       <service name="createQuoteItem" default-entity-name="QuoteItem"
>>> engine="simple"
>>>
>>>
>>>
>>>
>>
>

Re: svn commit: r1792270 - in /ofbiz/ofbiz-framework/trunk/applications/order: minilang/quote/QuoteServices.xml servicedef/services_quote.xml

Posted by Deepak Dixit <de...@hotwaxsystems.com>.
Let me check Jacques

Thanks & Regards
--
Deepak Dixit
www.hotwaxsystems.com

On Sat, Apr 22, 2017 at 2:35 PM, Jacques Le Roux <
jacques.le.roux@les7arts.com> wrote:

> Hi Deepak,
>
> Not sure which commit exactly, but since this one there are related test
> failures in trunk and R11 https://ci.apache.org/projects/ofbiz/logs/
>
> Thanks
>
> Jacques
>
>
>
>
> Le 22/04/2017 à 09:59, deepak@apache.org a écrit :
>
>> Author: deepak
>> Date: Sat Apr 22 07:59:45 2017
>> New Revision: 1792270
>>
>> URL: http://svn.apache.org/viewvc?rev=1792270&view=rev
>> Log:
>> Improved: Converted create and remove QuoteRole service to entity-auto
>> also added update and expire QuoteRole service.(OFBIZ-9331)
>>
>> Modified:
>>      ofbiz/ofbiz-framework/trunk/applications/order/minilang/quo
>> te/QuoteServices.xml
>>      ofbiz/ofbiz-framework/trunk/applications/order/servicedef/s
>> ervices_quote.xml
>>
>> Modified: ofbiz/ofbiz-framework/trunk/applications/order/minilang/quot
>> e/QuoteServices.xml
>> URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/app
>> lications/order/minilang/quote/QuoteServices.xml?rev=1792270
>> &r1=1792269&r2=1792270&view=diff
>> ============================================================
>> ==================
>> --- ofbiz/ofbiz-framework/trunk/applications/order/minilang/quote/QuoteServices.xml
>> (original)
>> +++ ofbiz/ofbiz-framework/trunk/applications/order/minilang/quote/QuoteServices.xml
>> Sat Apr 22 07:59:45 2017
>> @@ -281,47 +281,6 @@ under the License.
>>           <check-errors/>
>>       </simple-method>
>>   -    <!-- create a new QuoteRole -->
>> -    <simple-method method-name="createQuoteRole"
>> short-description="Create a QuoteRole">
>> -        <check-permission permission="ORDERMGR" action="_CREATE">
>> -            <fail-property resource="OrderErrorUiLabels"
>> property="OrderErrorCreatePermissionError"/>
>> -        </check-permission>
>> -        <check-errors/>
>> -        <set from-field="parameters.partyId"
>> field="lookupPKMap.partyId"/>
>> -        <set from-field="parameters.roleTypeId"
>> field="lookupPKMap.roleTypeId"/>
>> -        <find-by-primary-key entity-name="PartyRole" map="lookupPKMap"
>> value-field="partyRole"/>
>> -        <if-empty field="partyRole.partyId">
>> -            <check-permission permission="PARTYMGR" action="_CREATE">
>> -                <fail-property resource="OrderErrorUiLabels"
>> property="OrderErrorCreatePermissionError"/>
>> -            </check-permission>
>> -            <check-permission permission="PARTYMGR" action="_UPDATE">
>> -                <fail-property resource="OrderErrorUiLabels"
>> property="OrderErrorCreatePermissionError"/>
>> -            </check-permission>
>> -            <check-errors/>
>> -            <make-value value-field="partyRole" entity-name="PartyRole"/>
>> -            <set-pk-fields map="lookupPKMap" value-field="partyRole"/>
>> -            <create-value value-field="partyRole"/>
>> -        </if-empty>
>> -        <!-- create new entity and create all the fields -->
>> -        <make-value value-field="newEntity" entity-name="QuoteRole"/>
>> -        <set-pk-fields map="parameters" value-field="newEntity"/>
>> -        <create-value value-field="newEntity"/>
>> -        <property-to-field resource="OrderUiLabels"
>> property="OrderOrderQuoteRoleAddedSuccessfully" field="successMessage"/>
>> -        <check-errors/>
>> -    </simple-method>
>> -
>> -    <!-- remove an existing QuoteRole -->
>> -    <simple-method method-name="removeQuoteRole"
>> short-description="Remove an existing QuoteRole">
>> -        <check-permission permission="ORDERMGR" action="_DELETE">
>> -            <fail-property resource="OrderErrorUiLabels"
>> property="OrderErrorDeletePermissionError"/>
>> -        </check-permission>
>> -        <check-errors/>
>> -        <entity-one entity-name="QuoteRole" value-field="quoteRole"
>> auto-field-map="true"/>
>> -        <check-errors/>
>> -        <remove-value value-field="quoteRole"/>
>> -        <check-errors/>
>> -    </simple-method>
>> -
>>       <!-- create a new QuoteItem -->
>>       <simple-method method-name="createQuoteItem"
>> short-description="Create a QuoteItem">
>>           <entity-one entity-name="Quote" value-field="quote"
>> auto-field-map="true"/>
>>
>> Modified: ofbiz/ofbiz-framework/trunk/applications/order/servicedef/se
>> rvices_quote.xml
>> URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/app
>> lications/order/servicedef/services_quote.xml?rev=1792270&
>> r1=1792269&r2=1792270&view=diff
>> ============================================================
>> ==================
>> --- ofbiz/ofbiz-framework/trunk/applications/order/servicedef/services_quote.xml
>> (original)
>> +++ ofbiz/ofbiz-framework/trunk/applications/order/servicedef/services_quote.xml
>> Sat Apr 22 07:59:45 2017
>> @@ -69,16 +69,37 @@ under the License.
>>           <auto-attributes include="pk" mode="IN" optional="false"/>
>>       </service>
>>       <!-- QuoteRole  -->
>> -    <service name="createQuoteRole" default-entity-name="QuoteRole"
>> engine="simple"
>> -                location="component://order/mi
>> nilang/quote/QuoteServices.xml" invoke="createQuoteRole" auth="true">
>> +    <service name="createQuoteRole" default-entity-name="QuoteRole"
>> engine="entity-auto" invoke="create" auth="true">
>>           <description>Create a QuoteRole</description>
>> -        <auto-attributes include="pk" mode="INOUT" optional="true"/>
>> +        <required-permissions join-type="AND">
>> +            <check-permission permission="ORDERMGR" action="_CREATE"/>
>> +        </required-permissions>
>> +        <auto-attributes mode="IN" include="pk" />
>> +        <auto-attributes mode="IN" include="nonpk" optional="true"/>
>> +        <!-- make fromDate as optional for backward compatibility,
>> EntityAuto engine automatically set the fromDate to nowTimestamp if its not
>> missing-->
>> +        <override name="fromDate" mode="IN" optional="true"/>
>>       </service>
>> -    <service name="removeQuoteRole" default-entity-name="QuoteRole"
>> engine="simple"
>> -                location="component://order/mi
>> nilang/quote/QuoteServices.xml" invoke="removeQuoteRole" auth="true">
>> +    <service name="updateQuoteRole" default-entity-name="QuoteRole"
>> engine="entity-auto" invoke="update" auth="true">
>> +        <description>Update a QuoteRole</description>
>> +        <required-permissions join-type="AND">
>> +            <check-permission permission="ORDERMGR" action="_UPDATE"/>
>> +        </required-permissions>
>> +        <auto-attributes mode="IN" include="pk" />
>> +        <auto-attributes mode="IN" include="nonpk" optional="true"/>
>> +    </service>
>> +    <service name="removeQuoteRole" default-entity-name="QuoteRole"
>> engine="entity-auto" invoke="delete" auth="true">
>>           <description>Remove a QuoteRole</description>
>> -        <auto-attributes include="pk" mode="INOUT" optional="true"/>
>> -        <auto-attributes include="nonpk" mode="IN" optional="true"/>
>> +        <required-permissions join-type="AND">
>> +            <check-permission permission="ORDERMGR" action="_DELETE"/>
>> +        </required-permissions>
>> +        <auto-attributes include="pk" mode="IN" optional="false"/>
>> +    </service>
>> +    <service name="removeQuoteRole" default-entity-name="QuoteRole"
>> engine="entity-auto" invoke="expire" auth="true">
>> +        <description>Expire a QuoteRole</description>
>> +        <required-permissions join-type="AND">
>> +            <check-permission permission="ORDERMGR" action="_UPDATE"/>
>> +        </required-permissions>
>> +        <auto-attributes include="pk" mode="IN" optional="false"/>
>>       </service>
>>       <!-- QuoteItem  -->
>>       <service name="createQuoteItem" default-entity-name="QuoteItem"
>> engine="simple"
>>
>>
>>
>>
>