You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Nicolas Malin <ma...@librenberry.net> on 2014/09/23 00:19:05 UTC

entity-auto improvement ? Act 2

Hello all,

Second pass on the entity-auto engine ;)
I found some service that would be available to entity-auto conversion 
but a label is present to return a specific message.
We have some permission error message that will be manage by a 
permission service and failure message like this :
     <simple-method method-name="deleteWorkRequirementFulfillment" 
short-description="Delete a WorkRequirementFulfillment"><!--entity-auto-->
         <entity-one entity-name="WorkRequirementFulfillment" 
value-field="workRequirementFulfillment"/>
         <if-empty field="workRequirementFulfillment">
             <add-error>
                 <fail-property resource="WorkEffortUiLabels" 
property="WorkEffortRequirementFulfillmentDoesNotExists"/>
             </add-error>
             <check-errors/>
         </if-empty>

What is the best orientation ? Convert all service with specific error 
message and extend the entity auto to return a comprehensive message, or 
modify nothing ?
On the first case we progess on CRUD homogenization.
On the second case we keep dedicate message for the end user.

what do you think?


Re: entity-auto improvement ? Act 2

Posted by Nicolas Malin <ma...@librenberry.net>.
Hi Jacopo

Le 23/09/2014 05:49, Jacopo Cappellato a écrit :
> to keep it simple, we could return a more generic message
It's also my vision. I will open an issue with the improvement.

Nicolas

Re: entity-auto improvement ? Act 2

Posted by Jacopo Cappellato <ja...@hotwaxmedia.com>.
Hi Nicolas,

to keep it simple, we could return a more generic message (common to all entity-auto deletion) and remove the specific ones; I would also remove the associated label (if not used elsewhere).
I doubt that, with this approach we will loose much information because the various WorkEffortRequirementFulfillmentDoesNotExists may all be similar; if, in the migration process, you will find some exceptions where the message is very specific and informative, you could leave the service as is for now (but I doubt you will find many of these).

Just my 2 cents

Jacopo

On Sep 23, 2014, at 12:19 AM, Nicolas Malin <ma...@librenberry.net> wrote:

> Hello all,
> 
> Second pass on the entity-auto engine ;)
> I found some service that would be available to entity-auto conversion but a label is present to return a specific message.
> We have some permission error message that will be manage by a permission service and failure message like this :
>    <simple-method method-name="deleteWorkRequirementFulfillment" short-description="Delete a WorkRequirementFulfillment"><!--entity-auto-->
>        <entity-one entity-name="WorkRequirementFulfillment" value-field="workRequirementFulfillment"/>
>        <if-empty field="workRequirementFulfillment">
>            <add-error>
>                <fail-property resource="WorkEffortUiLabels" property="WorkEffortRequirementFulfillmentDoesNotExists"/>
>            </add-error>
>            <check-errors/>
>        </if-empty>
> 
> What is the best orientation ? Convert all service with specific error message and extend the entity auto to return a comprehensive message, or modify nothing ?
> On the first case we progess on CRUD homogenization.
> On the second case we keep dedicate message for the end user.
> 
> what do you think?
>