[DISCUSSION] Review ProductPromo action and condition process

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

[DISCUSSION] Review ProductPromo action and condition process

Nicolas Malin-2
Hello,

Yesterday during a boring time in the come back home train, I read the
ofbiz demo data review that the condition and action method are listed
through enumeration like :

<ProductPromoAction productPromoId="9010"
productPromoActionEnumId="PROMO_GWP" .../>
<ProductPromoCond productPromoId="9010"
inputParamEnumId="PPIP_PRODUCT_TOTAL" operatorEnumId="PPC_GTE"
condValue="1"/>

and liked to the code by java hard code (ProductPromoWorker.java)

condition :
         } else if ("PPIP_PRODUCT_TOTAL".equals(inputParamEnumId)) {
             // this type of condition allows items involved to be
involved in other quantity consuming cond/action, and does pro-rate the
price
....

action :
} else if ("PROMO_GWP".equals(productPromoActionEnumId)) {
...

This isn't really useful to manage and extend it but an idea raise in my
mind :)

Why not replace the enumeration by a customMethod. We can define a
interface service one for action and one for condition, with the related
customMethodType. Each hard coded enumeration would be convert to service.

Like this we can surcharge the current rules easily and create new one
for customer site without modify the core.
The main strategy point would be the interface service to pass the good
parameters.

<ProductPromoAction productPromoId="9010" customMethodId="PPA_PROMO_GWP"
.../>
<ProductPromoCond productPromoId="9010"
customMethodId="PPC_PRODUCT_TOTAL" operatorEnumId="PPC_GTE" condValue="1"/>

This is easily to improve on java code, screen and data.
What do you thinks ? Do you have an other idea to improve this ?

Cheers,
Nicolas

--
logoNrd <https://nereide.fr/>
        Nicolas Malin
The apache way <http://theapacheway.com/> : *Charity* Apache’s mission
is providing software for the public good.
[hidden email]
8 rue des Déportés 37000 TOURS, 02 47 50 30 54

Apache OFBiz <http://ofbiz.apache.org/>|The Apache Way
<http://theapacheway.com/>|réseau LE <http://www.libre-entreprise.org/>
Reply | Threaded
Open this post in threaded view
|

Re: [DISCUSSION] Review ProductPromo action and condition process

Jacques Le Roux
Administrator
Hi Nicolas,

I don't see why you speak about enumeration for ProductPromoCond and ProductPromoAction which are plain entities.

Jacques


Le 08/12/2017 à 14:14, Nicolas Malin a écrit :

> Hello,
>
> Yesterday during a boring time in the come back home train, I read the ofbiz demo data review that the condition and action method are listed
> through enumeration like :
>
> <ProductPromoAction productPromoId="9010" productPromoActionEnumId="PROMO_GWP" .../>
> <ProductPromoCond productPromoId="9010" inputParamEnumId="PPIP_PRODUCT_TOTAL" operatorEnumId="PPC_GTE" condValue="1"/>
>
> and liked to the code by java hard code (ProductPromoWorker.java)
>
> condition :
>         } else if ("PPIP_PRODUCT_TOTAL".equals(inputParamEnumId)) {
>             // this type of condition allows items involved to be involved in other quantity consuming cond/action, and does pro-rate the price
> ....
>
> action :
> } else if ("PROMO_GWP".equals(productPromoActionEnumId)) {
> ...
>
> This isn't really useful to manage and extend it but an idea raise in my mind :)
>
> Why not replace the enumeration by a customMethod. We can define a interface service one for action and one for condition, with the related
> customMethodType. Each hard coded enumeration would be convert to service.
>
> Like this we can surcharge the current rules easily and create new one for customer site without modify the core.
> The main strategy point would be the interface service to pass the good parameters.
>
> <ProductPromoAction productPromoId="9010" customMethodId="PPA_PROMO_GWP" .../>
> <ProductPromoCond productPromoId="9010" customMethodId="PPC_PRODUCT_TOTAL" operatorEnumId="PPC_GTE" condValue="1"/>
>
> This is easily to improve on java code, screen and data.
> What do you thinks ? Do you have an other idea to improve this ?
>
> Cheers,
> Nicolas
>

Reply | Threaded
Open this post in threaded view
|

Re: [DISCUSSION] Review ProductPromo action and condition process

Nicolas Malin-2
Hello,

Le 11/12/2017 à 13:08, Jacques Le Roux a écrit :
> Hi Nicolas,
>
> I don't see why you speak about enumeration for ProductPromoCond and
> ProductPromoAction which are plain entities.
Because it's the enumeration that determine the code base to execute.
It's the reason that I proposed to convert it to customMethod
Nicolas

>
> Jacques
>
>
> Le 08/12/2017 à 14:14, Nicolas Malin a écrit :
>> Hello,
>>
>> Yesterday during a boring time in the come back home train, I read
>> the ofbiz demo data review that the condition and action method are
>> listed through enumeration like :
>>
>> <ProductPromoAction productPromoId="9010"
>> productPromoActionEnumId="PROMO_GWP" .../>
>> <ProductPromoCond productPromoId="9010"
>> inputParamEnumId="PPIP_PRODUCT_TOTAL" operatorEnumId="PPC_GTE"
>> condValue="1"/>
>>
>> and liked to the code by java hard code (ProductPromoWorker.java)
>>
>> condition :
>>         } else if ("PPIP_PRODUCT_TOTAL".equals(inputParamEnumId)) {
>>             // this type of condition allows items involved to be
>> involved in other quantity consuming cond/action, and does pro-rate
>> the price
>> ....
>>
>> action :
>> } else if ("PROMO_GWP".equals(productPromoActionEnumId)) {
>> ...
>>
>> This isn't really useful to manage and extend it but an idea raise in
>> my mind :)
>>
>> Why not replace the enumeration by a customMethod. We can define a
>> interface service one for action and one for condition, with the
>> related customMethodType. Each hard coded enumeration would be
>> convert to service.
>>
>> Like this we can surcharge the current rules easily and create new
>> one for customer site without modify the core.
>> The main strategy point would be the interface service to pass the
>> good parameters.
>>
>> <ProductPromoAction productPromoId="9010"
>> customMethodId="PPA_PROMO_GWP" .../>
>> <ProductPromoCond productPromoId="9010"
>> customMethodId="PPC_PRODUCT_TOTAL" operatorEnumId="PPC_GTE"
>> condValue="1"/>
>>
>> This is easily to improve on java code, screen and data.
>> What do you thinks ? Do you have an other idea to improve this ?
>>
>> Cheers,
>> Nicolas
>>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: [DISCUSSION] Review ProductPromo action and condition process

Jacques Le Roux
Administrator
In reply to this post by Jacques Le Roux
Ha I see, you speak about

     <EnumerationType description="Product Promotion Parent Enum Type" enumTypeId="PROD_PROMO" hasTable="N" parentTypeId=""/>
     <EnumerationType description="Product Promotion Input Parameter" enumTypeId="PROD_PROMO_IN_PARAM" hasTable="N" parentTypeId="PROD_PROMO"/>
     <EnumerationType description="Product Promotion Condition" enumTypeId="PROD_PROMO_COND" hasTable="N" parentTypeId="PROD_PROMO"/>

Then yes I understand and I think a POC would be welcome :)

Jacques


Le 11/12/2017 à 13:08, Jacques Le Roux a écrit :

> Hi Nicolas,
>
> I don't see why you speak about enumeration for ProductPromoCond and ProductPromoAction which are plain entities.
>
> Jacques
>
>
> Le 08/12/2017 à 14:14, Nicolas Malin a écrit :
>> Hello,
>>
>> Yesterday during a boring time in the come back home train, I read the ofbiz demo data review that the condition and action method are listed
>> through enumeration like :
>>
>> <ProductPromoAction productPromoId="9010" productPromoActionEnumId="PROMO_GWP" .../>
>> <ProductPromoCond productPromoId="9010" inputParamEnumId="PPIP_PRODUCT_TOTAL" operatorEnumId="PPC_GTE" condValue="1"/>
>>
>> and liked to the code by java hard code (ProductPromoWorker.java)
>>
>> condition :
>>         } else if ("PPIP_PRODUCT_TOTAL".equals(inputParamEnumId)) {
>>             // this type of condition allows items involved to be involved in other quantity consuming cond/action, and does pro-rate the price
>> ....
>>
>> action :
>> } else if ("PROMO_GWP".equals(productPromoActionEnumId)) {
>> ...
>>
>> This isn't really useful to manage and extend it but an idea raise in my mind :)
>>
>> Why not replace the enumeration by a customMethod. We can define a interface service one for action and one for condition, with the related
>> customMethodType. Each hard coded enumeration would be convert to service.
>>
>> Like this we can surcharge the current rules easily and create new one for customer site without modify the core.
>> The main strategy point would be the interface service to pass the good parameters.
>>
>> <ProductPromoAction productPromoId="9010" customMethodId="PPA_PROMO_GWP" .../>
>> <ProductPromoCond productPromoId="9010" customMethodId="PPC_PRODUCT_TOTAL" operatorEnumId="PPC_GTE" condValue="1"/>
>>
>> This is easily to improve on java code, screen and data.
>> What do you thinks ? Do you have an other idea to improve this ?
>>
>> Cheers,
>> Nicolas
>>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: [DISCUSSION] Review ProductPromo action and condition process

Rishi Solanki
+1 for the proposal, Nicolas!


Rishi Solanki
Sr Manager, Enterprise Software Development
HotWax Systems Pvt. Ltd.
Direct: +91-9893287847
http://www.hotwaxsystems.com
www.hotwax.co

On Mon, Dec 11, 2017 at 7:20 PM, Jacques Le Roux <
[hidden email]> wrote:

> Ha I see, you speak about
>
>     <EnumerationType description="Product Promotion Parent Enum Type"
> enumTypeId="PROD_PROMO" hasTable="N" parentTypeId=""/>
>     <EnumerationType description="Product Promotion Input Parameter"
> enumTypeId="PROD_PROMO_IN_PARAM" hasTable="N" parentTypeId="PROD_PROMO"/>
>     <EnumerationType description="Product Promotion Condition"
> enumTypeId="PROD_PROMO_COND" hasTable="N" parentTypeId="PROD_PROMO"/>
>
> Then yes I understand and I think a POC would be welcome :)
>
> Jacques
>
>
> Le 11/12/2017 à 13:08, Jacques Le Roux a écrit :
>
>> Hi Nicolas,
>>
>> I don't see why you speak about enumeration for ProductPromoCond and
>> ProductPromoAction which are plain entities.
>>
>> Jacques
>>
>>
>> Le 08/12/2017 à 14:14, Nicolas Malin a écrit :
>>
>>> Hello,
>>>
>>> Yesterday during a boring time in the come back home train, I read the
>>> ofbiz demo data review that the condition and action method are listed
>>> through enumeration like :
>>>
>>> <ProductPromoAction productPromoId="9010" productPromoActionEnumId="PROMO_GWP"
>>> .../>
>>> <ProductPromoCond productPromoId="9010" inputParamEnumId="PPIP_PRODUCT_TOTAL"
>>> operatorEnumId="PPC_GTE" condValue="1"/>
>>>
>>> and liked to the code by java hard code (ProductPromoWorker.java)
>>>
>>> condition :
>>>         } else if ("PPIP_PRODUCT_TOTAL".equals(inputParamEnumId)) {
>>>             // this type of condition allows items involved to be
>>> involved in other quantity consuming cond/action, and does pro-rate the
>>> price
>>> ....
>>>
>>> action :
>>> } else if ("PROMO_GWP".equals(productPromoActionEnumId)) {
>>> ...
>>>
>>> This isn't really useful to manage and extend it but an idea raise in my
>>> mind :)
>>>
>>> Why not replace the enumeration by a customMethod. We can define a
>>> interface service one for action and one for condition, with the related
>>> customMethodType. Each hard coded enumeration would be convert to service.
>>>
>>> Like this we can surcharge the current rules easily and create new one
>>> for customer site without modify the core.
>>> The main strategy point would be the interface service to pass the good
>>> parameters.
>>>
>>> <ProductPromoAction productPromoId="9010" customMethodId="PPA_PROMO_GWP"
>>> .../>
>>> <ProductPromoCond productPromoId="9010" customMethodId="PPC_PRODUCT_TOTAL"
>>> operatorEnumId="PPC_GTE" condValue="1"/>
>>>
>>> This is easily to improve on java code, screen and data.
>>> What do you thinks ? Do you have an other idea to improve this ?
>>>
>>> Cheers,
>>> Nicolas
>>>
>>>
>>
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: [DISCUSSION] Review ProductPromo action and condition process

Nicolas Malin-2
Thanks for you return, yes I will try to work on POC this next year.

Nicolas


Le 12/12/2017 à 12:14, Rishi Solanki a écrit :

> +1 for the proposal, Nicolas!
>
>
> Rishi Solanki
> Sr Manager, Enterprise Software Development
> HotWax Systems Pvt. Ltd.
> Direct: +91-9893287847
> http://www.hotwaxsystems.com
> www.hotwax.co
>
> On Mon, Dec 11, 2017 at 7:20 PM, Jacques Le Roux <
> [hidden email]> wrote:
>
>> Ha I see, you speak about
>>
>>      <EnumerationType description="Product Promotion Parent Enum Type"
>> enumTypeId="PROD_PROMO" hasTable="N" parentTypeId=""/>
>>      <EnumerationType description="Product Promotion Input Parameter"
>> enumTypeId="PROD_PROMO_IN_PARAM" hasTable="N" parentTypeId="PROD_PROMO"/>
>>      <EnumerationType description="Product Promotion Condition"
>> enumTypeId="PROD_PROMO_COND" hasTable="N" parentTypeId="PROD_PROMO"/>
>>
>> Then yes I understand and I think a POC would be welcome :)
>>
>> Jacques
>>
>>
>> Le 11/12/2017 à 13:08, Jacques Le Roux a écrit :
>>
>>> Hi Nicolas,
>>>
>>> I don't see why you speak about enumeration for ProductPromoCond and
>>> ProductPromoAction which are plain entities.
>>>
>>> Jacques
>>>
>>>
>>> Le 08/12/2017 à 14:14, Nicolas Malin a écrit :
>>>
>>>> Hello,
>>>>
>>>> Yesterday during a boring time in the come back home train, I read the
>>>> ofbiz demo data review that the condition and action method are listed
>>>> through enumeration like :
>>>>
>>>> <ProductPromoAction productPromoId="9010" productPromoActionEnumId="PROMO_GWP"
>>>> .../>
>>>> <ProductPromoCond productPromoId="9010" inputParamEnumId="PPIP_PRODUCT_TOTAL"
>>>> operatorEnumId="PPC_GTE" condValue="1"/>
>>>>
>>>> and liked to the code by java hard code (ProductPromoWorker.java)
>>>>
>>>> condition :
>>>>          } else if ("PPIP_PRODUCT_TOTAL".equals(inputParamEnumId)) {
>>>>              // this type of condition allows items involved to be
>>>> involved in other quantity consuming cond/action, and does pro-rate the
>>>> price
>>>> ....
>>>>
>>>> action :
>>>> } else if ("PROMO_GWP".equals(productPromoActionEnumId)) {
>>>> ...
>>>>
>>>> This isn't really useful to manage and extend it but an idea raise in my
>>>> mind :)
>>>>
>>>> Why not replace the enumeration by a customMethod. We can define a
>>>> interface service one for action and one for condition, with the related
>>>> customMethodType. Each hard coded enumeration would be convert to service.
>>>>
>>>> Like this we can surcharge the current rules easily and create new one
>>>> for customer site without modify the core.
>>>> The main strategy point would be the interface service to pass the good
>>>> parameters.
>>>>
>>>> <ProductPromoAction productPromoId="9010" customMethodId="PPA_PROMO_GWP"
>>>> .../>
>>>> <ProductPromoCond productPromoId="9010" customMethodId="PPC_PRODUCT_TOTAL"
>>>> operatorEnumId="PPC_GTE" condValue="1"/>
>>>>
>>>> This is easily to improve on java code, screen and data.
>>>> What do you thinks ? Do you have an other idea to improve this ?
>>>>
>>>> Cheers,
>>>> Nicolas
>>>>
>>>>
>>>

Reply | Threaded
Open this post in threaded view
|

Re: [DISCUSSION] Review ProductPromo action and condition process

Nicolas Malin-2
Hello , for information we started a POC on nereide labs, if you want to
follow the work it's here :
https://labs.nereide.fr/10031/ofbiz-promo-engine-soa/compare/trunk...develop

Nicolas


On 30/12/2017 11:05, Nicolas Malin wrote:

> Thanks for you return, yes I will try to work on POC this next year.
>
> Nicolas
>
>
> Le 12/12/2017 à 12:14, Rishi Solanki a écrit :
>> +1 for the proposal, Nicolas!
>>
>>
>> Rishi Solanki
>> Sr Manager, Enterprise Software Development
>> HotWax Systems Pvt. Ltd.
>> Direct: +91-9893287847
>> http://www.hotwaxsystems.com
>> www.hotwax.co
>>
>> On Mon, Dec 11, 2017 at 7:20 PM, Jacques Le Roux <
>> [hidden email]> wrote:
>>
>>> Ha I see, you speak about
>>>
>>>      <EnumerationType description="Product Promotion Parent Enum Type"
>>> enumTypeId="PROD_PROMO" hasTable="N" parentTypeId=""/>
>>>      <EnumerationType description="Product Promotion Input Parameter"
>>> enumTypeId="PROD_PROMO_IN_PARAM" hasTable="N"
>>> parentTypeId="PROD_PROMO"/>
>>>      <EnumerationType description="Product Promotion Condition"
>>> enumTypeId="PROD_PROMO_COND" hasTable="N" parentTypeId="PROD_PROMO"/>
>>>
>>> Then yes I understand and I think a POC would be welcome :)
>>>
>>> Jacques
>>>
>>>
>>> Le 11/12/2017 à 13:08, Jacques Le Roux a écrit :
>>>
>>>> Hi Nicolas,
>>>>
>>>> I don't see why you speak about enumeration for ProductPromoCond and
>>>> ProductPromoAction which are plain entities.
>>>>
>>>> Jacques
>>>>
>>>>
>>>> Le 08/12/2017 à 14:14, Nicolas Malin a écrit :
>>>>
>>>>> Hello,
>>>>>
>>>>> Yesterday during a boring time in the come back home train, I read
>>>>> the
>>>>> ofbiz demo data review that the condition and action method are
>>>>> listed
>>>>> through enumeration like :
>>>>>
>>>>> <ProductPromoAction productPromoId="9010"
>>>>> productPromoActionEnumId="PROMO_GWP"
>>>>> .../>
>>>>> <ProductPromoCond productPromoId="9010"
>>>>> inputParamEnumId="PPIP_PRODUCT_TOTAL"
>>>>> operatorEnumId="PPC_GTE" condValue="1"/>
>>>>>
>>>>> and liked to the code by java hard code (ProductPromoWorker.java)
>>>>>
>>>>> condition :
>>>>>          } else if ("PPIP_PRODUCT_TOTAL".equals(inputParamEnumId)) {
>>>>>              // this type of condition allows items involved to be
>>>>> involved in other quantity consuming cond/action, and does
>>>>> pro-rate the
>>>>> price
>>>>> ....
>>>>>
>>>>> action :
>>>>> } else if ("PROMO_GWP".equals(productPromoActionEnumId)) {
>>>>> ...
>>>>>
>>>>> This isn't really useful to manage and extend it but an idea raise
>>>>> in my
>>>>> mind :)
>>>>>
>>>>> Why not replace the enumeration by a customMethod. We can define a
>>>>> interface service one for action and one for condition, with the
>>>>> related
>>>>> customMethodType. Each hard coded enumeration would be convert to
>>>>> service.
>>>>>
>>>>> Like this we can surcharge the current rules easily and create new
>>>>> one
>>>>> for customer site without modify the core.
>>>>> The main strategy point would be the interface service to pass the
>>>>> good
>>>>> parameters.
>>>>>
>>>>> <ProductPromoAction productPromoId="9010"
>>>>> customMethodId="PPA_PROMO_GWP"
>>>>> .../>
>>>>> <ProductPromoCond productPromoId="9010"
>>>>> customMethodId="PPC_PRODUCT_TOTAL"
>>>>> operatorEnumId="PPC_GTE" condValue="1"/>
>>>>>
>>>>> This is easily to improve on java code, screen and data.
>>>>> What do you thinks ? Do you have an other idea to improve this ?
>>>>>
>>>>> Cheers,
>>>>> Nicolas
>>>>>
>>>>>
>>>>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: [DISCUSSION] Review ProductPromo action and condition process

Jacques Le Roux
Administrator
Hi Nicolas,

Is that open, ie accessible to everyone?

Jacques


Le 14/02/2018 à 09:03, Nicolas Malin a écrit :

> Hello , for information we started a POC on nereide labs, if you want to follow the work it's here :
> https://labs.nereide.fr/10031/ofbiz-promo-engine-soa/compare/trunk...develop
>
> Nicolas
>
>
> On 30/12/2017 11:05, Nicolas Malin wrote:
>> Thanks for you return, yes I will try to work on POC this next year.
>>
>> Nicolas
>>
>>
>> Le 12/12/2017 à 12:14, Rishi Solanki a écrit :
>>> +1 for the proposal, Nicolas!
>>>
>>>
>>> Rishi Solanki
>>> Sr Manager, Enterprise Software Development
>>> HotWax Systems Pvt. Ltd.
>>> Direct: +91-9893287847
>>> http://www.hotwaxsystems.com
>>> www.hotwax.co
>>>
>>> On Mon, Dec 11, 2017 at 7:20 PM, Jacques Le Roux <
>>> [hidden email]> wrote:
>>>
>>>> Ha I see, you speak about
>>>>
>>>>      <EnumerationType description="Product Promotion Parent Enum Type"
>>>> enumTypeId="PROD_PROMO" hasTable="N" parentTypeId=""/>
>>>>      <EnumerationType description="Product Promotion Input Parameter"
>>>> enumTypeId="PROD_PROMO_IN_PARAM" hasTable="N" parentTypeId="PROD_PROMO"/>
>>>>      <EnumerationType description="Product Promotion Condition"
>>>> enumTypeId="PROD_PROMO_COND" hasTable="N" parentTypeId="PROD_PROMO"/>
>>>>
>>>> Then yes I understand and I think a POC would be welcome :)
>>>>
>>>> Jacques
>>>>
>>>>
>>>> Le 11/12/2017 à 13:08, Jacques Le Roux a écrit :
>>>>
>>>>> Hi Nicolas,
>>>>>
>>>>> I don't see why you speak about enumeration for ProductPromoCond and
>>>>> ProductPromoAction which are plain entities.
>>>>>
>>>>> Jacques
>>>>>
>>>>>
>>>>> Le 08/12/2017 à 14:14, Nicolas Malin a écrit :
>>>>>
>>>>>> Hello,
>>>>>>
>>>>>> Yesterday during a boring time in the come back home train, I read the
>>>>>> ofbiz demo data review that the condition and action method are listed
>>>>>> through enumeration like :
>>>>>>
>>>>>> <ProductPromoAction productPromoId="9010" productPromoActionEnumId="PROMO_GWP"
>>>>>> .../>
>>>>>> <ProductPromoCond productPromoId="9010" inputParamEnumId="PPIP_PRODUCT_TOTAL"
>>>>>> operatorEnumId="PPC_GTE" condValue="1"/>
>>>>>>
>>>>>> and liked to the code by java hard code (ProductPromoWorker.java)
>>>>>>
>>>>>> condition :
>>>>>>          } else if ("PPIP_PRODUCT_TOTAL".equals(inputParamEnumId)) {
>>>>>>              // this type of condition allows items involved to be
>>>>>> involved in other quantity consuming cond/action, and does pro-rate the
>>>>>> price
>>>>>> ....
>>>>>>
>>>>>> action :
>>>>>> } else if ("PROMO_GWP".equals(productPromoActionEnumId)) {
>>>>>> ...
>>>>>>
>>>>>> This isn't really useful to manage and extend it but an idea raise in my
>>>>>> mind :)
>>>>>>
>>>>>> Why not replace the enumeration by a customMethod. We can define a
>>>>>> interface service one for action and one for condition, with the related
>>>>>> customMethodType. Each hard coded enumeration would be convert to service.
>>>>>>
>>>>>> Like this we can surcharge the current rules easily and create new one
>>>>>> for customer site without modify the core.
>>>>>> The main strategy point would be the interface service to pass the good
>>>>>> parameters.
>>>>>>
>>>>>> <ProductPromoAction productPromoId="9010" customMethodId="PPA_PROMO_GWP"
>>>>>> .../>
>>>>>> <ProductPromoCond productPromoId="9010" customMethodId="PPC_PRODUCT_TOTAL"
>>>>>> operatorEnumId="PPC_GTE" condValue="1"/>
>>>>>>
>>>>>> This is easily to improve on java code, screen and data.
>>>>>> What do you thinks ? Do you have an other idea to improve this ?
>>>>>>
>>>>>> Cheers,
>>>>>> Nicolas
>>>>>>
>>>>>>
>>>>>
>>
>>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: [DISCUSSION] Review ProductPromo action and condition process

Nicolas Malin-2
Hi Jacques,

Normally yes, it's in read only.

Of course I will create an issue with the patch when the POC will be
functional

Nicolas

On 14/02/2018 12:01, Jacques Le Roux wrote:

> Hi Nicolas,
>
> Is that open, ie accessible to everyone?
>
> Jacques
>
>
> Le 14/02/2018 à 09:03, Nicolas Malin a écrit :
>> Hello , for information we started a POC on nereide labs, if you want
>> to follow the work it's here :
>> https://labs.nereide.fr/10031/ofbiz-promo-engine-soa/compare/trunk...develop
>>
>> Nicolas
>>
>>
>> On 30/12/2017 11:05, Nicolas Malin wrote:
>>> Thanks for you return, yes I will try to work on POC this next year.
>>>
>>> Nicolas
>>>
>>>
>>> Le 12/12/2017 à 12:14, Rishi Solanki a écrit :
>>>> +1 for the proposal, Nicolas!
>>>>
>>>>
>>>> Rishi Solanki
>>>> Sr Manager, Enterprise Software Development
>>>> HotWax Systems Pvt. Ltd.
>>>> Direct: +91-9893287847
>>>> http://www.hotwaxsystems.com
>>>> www.hotwax.co
>>>>
>>>> On Mon, Dec 11, 2017 at 7:20 PM, Jacques Le Roux <
>>>> [hidden email]> wrote:
>>>>
>>>>> Ha I see, you speak about
>>>>>
>>>>>      <EnumerationType description="Product Promotion Parent Enum
>>>>> Type"
>>>>> enumTypeId="PROD_PROMO" hasTable="N" parentTypeId=""/>
>>>>>      <EnumerationType description="Product Promotion Input Parameter"
>>>>> enumTypeId="PROD_PROMO_IN_PARAM" hasTable="N"
>>>>> parentTypeId="PROD_PROMO"/>
>>>>>      <EnumerationType description="Product Promotion Condition"
>>>>> enumTypeId="PROD_PROMO_COND" hasTable="N" parentTypeId="PROD_PROMO"/>
>>>>>
>>>>> Then yes I understand and I think a POC would be welcome :)
>>>>>
>>>>> Jacques
>>>>>
>>>>>
>>>>> Le 11/12/2017 à 13:08, Jacques Le Roux a écrit :
>>>>>
>>>>>> Hi Nicolas,
>>>>>>
>>>>>> I don't see why you speak about enumeration for ProductPromoCond and
>>>>>> ProductPromoAction which are plain entities.
>>>>>>
>>>>>> Jacques
>>>>>>
>>>>>>
>>>>>> Le 08/12/2017 à 14:14, Nicolas Malin a écrit :
>>>>>>
>>>>>>> Hello,
>>>>>>>
>>>>>>> Yesterday during a boring time in the come back home train, I
>>>>>>> read the
>>>>>>> ofbiz demo data review that the condition and action method are
>>>>>>> listed
>>>>>>> through enumeration like :
>>>>>>>
>>>>>>> <ProductPromoAction productPromoId="9010"
>>>>>>> productPromoActionEnumId="PROMO_GWP"
>>>>>>> .../>
>>>>>>> <ProductPromoCond productPromoId="9010"
>>>>>>> inputParamEnumId="PPIP_PRODUCT_TOTAL"
>>>>>>> operatorEnumId="PPC_GTE" condValue="1"/>
>>>>>>>
>>>>>>> and liked to the code by java hard code (ProductPromoWorker.java)
>>>>>>>
>>>>>>> condition :
>>>>>>>          } else if
>>>>>>> ("PPIP_PRODUCT_TOTAL".equals(inputParamEnumId)) {
>>>>>>>              // this type of condition allows items involved to be
>>>>>>> involved in other quantity consuming cond/action, and does
>>>>>>> pro-rate the
>>>>>>> price
>>>>>>> ....
>>>>>>>
>>>>>>> action :
>>>>>>> } else if ("PROMO_GWP".equals(productPromoActionEnumId)) {
>>>>>>> ...
>>>>>>>
>>>>>>> This isn't really useful to manage and extend it but an idea
>>>>>>> raise in my
>>>>>>> mind :)
>>>>>>>
>>>>>>> Why not replace the enumeration by a customMethod. We can define a
>>>>>>> interface service one for action and one for condition, with the
>>>>>>> related
>>>>>>> customMethodType. Each hard coded enumeration would be convert
>>>>>>> to service.
>>>>>>>
>>>>>>> Like this we can surcharge the current rules easily and create
>>>>>>> new one
>>>>>>> for customer site without modify the core.
>>>>>>> The main strategy point would be the interface service to pass
>>>>>>> the good
>>>>>>> parameters.
>>>>>>>
>>>>>>> <ProductPromoAction productPromoId="9010"
>>>>>>> customMethodId="PPA_PROMO_GWP"
>>>>>>> .../>
>>>>>>> <ProductPromoCond productPromoId="9010"
>>>>>>> customMethodId="PPC_PRODUCT_TOTAL"
>>>>>>> operatorEnumId="PPC_GTE" condValue="1"/>
>>>>>>>
>>>>>>> This is easily to improve on java code, screen and data.
>>>>>>> What do you thinks ? Do you have an other idea to improve this ?
>>>>>>>
>>>>>>> Cheers,
>>>>>>> Nicolas
>>>>>>>
>>>>>>>
>>>>>>
>>>
>>>
>>
>>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: [DISCUSSION] Review ProductPromo action and condition process

Jacques Le Roux
Administrator
Cool, thanks

Jacques


Le 14/02/2018 à 14:54, Nicolas Malin a écrit :

> Hi Jacques,
>
> Normally yes, it's in read only.
>
> Of course I will create an issue with the patch when the POC will be functional
>
> Nicolas
>
> On 14/02/2018 12:01, Jacques Le Roux wrote:
>> Hi Nicolas,
>>
>> Is that open, ie accessible to everyone?
>>
>> Jacques
>>
>>
>> Le 14/02/2018 à 09:03, Nicolas Malin a écrit :
>>> Hello , for information we started a POC on nereide labs, if you want to follow the work it's here :
>>> https://labs.nereide.fr/10031/ofbiz-promo-engine-soa/compare/trunk...develop
>>>
>>> Nicolas
>>>
>>>
>>> On 30/12/2017 11:05, Nicolas Malin wrote:
>>>> Thanks for you return, yes I will try to work on POC this next year.
>>>>
>>>> Nicolas
>>>>
>>>>
>>>> Le 12/12/2017 à 12:14, Rishi Solanki a écrit :
>>>>> +1 for the proposal, Nicolas!
>>>>>
>>>>>
>>>>> Rishi Solanki
>>>>> Sr Manager, Enterprise Software Development
>>>>> HotWax Systems Pvt. Ltd.
>>>>> Direct: +91-9893287847
>>>>> http://www.hotwaxsystems.com
>>>>> www.hotwax.co
>>>>>
>>>>> On Mon, Dec 11, 2017 at 7:20 PM, Jacques Le Roux <
>>>>> [hidden email]> wrote:
>>>>>
>>>>>> Ha I see, you speak about
>>>>>>
>>>>>>      <EnumerationType description="Product Promotion Parent Enum Type"
>>>>>> enumTypeId="PROD_PROMO" hasTable="N" parentTypeId=""/>
>>>>>>      <EnumerationType description="Product Promotion Input Parameter"
>>>>>> enumTypeId="PROD_PROMO_IN_PARAM" hasTable="N" parentTypeId="PROD_PROMO"/>
>>>>>>      <EnumerationType description="Product Promotion Condition"
>>>>>> enumTypeId="PROD_PROMO_COND" hasTable="N" parentTypeId="PROD_PROMO"/>
>>>>>>
>>>>>> Then yes I understand and I think a POC would be welcome :)
>>>>>>
>>>>>> Jacques
>>>>>>
>>>>>>
>>>>>> Le 11/12/2017 à 13:08, Jacques Le Roux a écrit :
>>>>>>
>>>>>>> Hi Nicolas,
>>>>>>>
>>>>>>> I don't see why you speak about enumeration for ProductPromoCond and
>>>>>>> ProductPromoAction which are plain entities.
>>>>>>>
>>>>>>> Jacques
>>>>>>>
>>>>>>>
>>>>>>> Le 08/12/2017 à 14:14, Nicolas Malin a écrit :
>>>>>>>
>>>>>>>> Hello,
>>>>>>>>
>>>>>>>> Yesterday during a boring time in the come back home train, I read the
>>>>>>>> ofbiz demo data review that the condition and action method are listed
>>>>>>>> through enumeration like :
>>>>>>>>
>>>>>>>> <ProductPromoAction productPromoId="9010" productPromoActionEnumId="PROMO_GWP"
>>>>>>>> .../>
>>>>>>>> <ProductPromoCond productPromoId="9010" inputParamEnumId="PPIP_PRODUCT_TOTAL"
>>>>>>>> operatorEnumId="PPC_GTE" condValue="1"/>
>>>>>>>>
>>>>>>>> and liked to the code by java hard code (ProductPromoWorker.java)
>>>>>>>>
>>>>>>>> condition :
>>>>>>>>          } else if ("PPIP_PRODUCT_TOTAL".equals(inputParamEnumId)) {
>>>>>>>>              // this type of condition allows items involved to be
>>>>>>>> involved in other quantity consuming cond/action, and does pro-rate the
>>>>>>>> price
>>>>>>>> ....
>>>>>>>>
>>>>>>>> action :
>>>>>>>> } else if ("PROMO_GWP".equals(productPromoActionEnumId)) {
>>>>>>>> ...
>>>>>>>>
>>>>>>>> This isn't really useful to manage and extend it but an idea raise in my
>>>>>>>> mind :)
>>>>>>>>
>>>>>>>> Why not replace the enumeration by a customMethod. We can define a
>>>>>>>> interface service one for action and one for condition, with the related
>>>>>>>> customMethodType. Each hard coded enumeration would be convert to service.
>>>>>>>>
>>>>>>>> Like this we can surcharge the current rules easily and create new one
>>>>>>>> for customer site without modify the core.
>>>>>>>> The main strategy point would be the interface service to pass the good
>>>>>>>> parameters.
>>>>>>>>
>>>>>>>> <ProductPromoAction productPromoId="9010" customMethodId="PPA_PROMO_GWP"
>>>>>>>> .../>
>>>>>>>> <ProductPromoCond productPromoId="9010" customMethodId="PPC_PRODUCT_TOTAL"
>>>>>>>> operatorEnumId="PPC_GTE" condValue="1"/>
>>>>>>>>
>>>>>>>> This is easily to improve on java code, screen and data.
>>>>>>>> What do you thinks ? Do you have an other idea to improve this ?
>>>>>>>>
>>>>>>>> Cheers,
>>>>>>>> Nicolas
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: [DISCUSSION] Review ProductPromo action and condition process

Nicolas Malin-2
Hello I open an issue [1] to commit soon the Poc

Nicolas

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


On 14/02/2018 17:42, Jacques Le Roux wrote:

> Cool, thanks
>
> Jacques
>
>
> Le 14/02/2018 à 14:54, Nicolas Malin a écrit :
>> Hi Jacques,
>>
>> Normally yes, it's in read only.
>>
>> Of course I will create an issue with the patch when the POC will be
>> functional
>>
>> Nicolas
>>
>> On 14/02/2018 12:01, Jacques Le Roux wrote:
>>> Hi Nicolas,
>>>
>>> Is that open, ie accessible to everyone?
>>>
>>> Jacques
>>>
>>>
>>> Le 14/02/2018 à 09:03, Nicolas Malin a écrit :
>>>> Hello , for information we started a POC on nereide labs, if you
>>>> want to follow the work it's here :
>>>> https://labs.nereide.fr/10031/ofbiz-promo-engine-soa/compare/trunk...develop
>>>>
>>>> Nicolas
>>>>
>>>>
>>>> On 30/12/2017 11:05, Nicolas Malin wrote:
>>>>> Thanks for you return, yes I will try to work on POC this next year.
>>>>>
>>>>> Nicolas
>>>>>
>>>>>
>>>>> Le 12/12/2017 à 12:14, Rishi Solanki a écrit :
>>>>>> +1 for the proposal, Nicolas!
>>>>>>
>>>>>>
>>>>>> Rishi Solanki
>>>>>> Sr Manager, Enterprise Software Development
>>>>>> HotWax Systems Pvt. Ltd.
>>>>>> Direct: +91-9893287847
>>>>>> http://www.hotwaxsystems.com
>>>>>> www.hotwax.co
>>>>>>
>>>>>> On Mon, Dec 11, 2017 at 7:20 PM, Jacques Le Roux <
>>>>>> [hidden email]> wrote:
>>>>>>
>>>>>>> Ha I see, you speak about
>>>>>>>
>>>>>>>      <EnumerationType description="Product Promotion Parent Enum
>>>>>>> Type"
>>>>>>> enumTypeId="PROD_PROMO" hasTable="N" parentTypeId=""/>
>>>>>>>      <EnumerationType description="Product Promotion Input
>>>>>>> Parameter"
>>>>>>> enumTypeId="PROD_PROMO_IN_PARAM" hasTable="N"
>>>>>>> parentTypeId="PROD_PROMO"/>
>>>>>>>      <EnumerationType description="Product Promotion Condition"
>>>>>>> enumTypeId="PROD_PROMO_COND" hasTable="N"
>>>>>>> parentTypeId="PROD_PROMO"/>
>>>>>>>
>>>>>>> Then yes I understand and I think a POC would be welcome :)
>>>>>>>
>>>>>>> Jacques
>>>>>>>
>>>>>>>
>>>>>>> Le 11/12/2017 à 13:08, Jacques Le Roux a écrit :
>>>>>>>
>>>>>>>> Hi Nicolas,
>>>>>>>>
>>>>>>>> I don't see why you speak about enumeration for
>>>>>>>> ProductPromoCond and
>>>>>>>> ProductPromoAction which are plain entities.
>>>>>>>>
>>>>>>>> Jacques
>>>>>>>>
>>>>>>>>
>>>>>>>> Le 08/12/2017 à 14:14, Nicolas Malin a écrit :
>>>>>>>>
>>>>>>>>> Hello,
>>>>>>>>>
>>>>>>>>> Yesterday during a boring time in the come back home train, I
>>>>>>>>> read the
>>>>>>>>> ofbiz demo data review that the condition and action method
>>>>>>>>> are listed
>>>>>>>>> through enumeration like :
>>>>>>>>>
>>>>>>>>> <ProductPromoAction productPromoId="9010"
>>>>>>>>> productPromoActionEnumId="PROMO_GWP"
>>>>>>>>> .../>
>>>>>>>>> <ProductPromoCond productPromoId="9010"
>>>>>>>>> inputParamEnumId="PPIP_PRODUCT_TOTAL"
>>>>>>>>> operatorEnumId="PPC_GTE" condValue="1"/>
>>>>>>>>>
>>>>>>>>> and liked to the code by java hard code (ProductPromoWorker.java)
>>>>>>>>>
>>>>>>>>> condition :
>>>>>>>>>          } else if
>>>>>>>>> ("PPIP_PRODUCT_TOTAL".equals(inputParamEnumId)) {
>>>>>>>>>              // this type of condition allows items involved
>>>>>>>>> to be
>>>>>>>>> involved in other quantity consuming cond/action, and does
>>>>>>>>> pro-rate the
>>>>>>>>> price
>>>>>>>>> ....
>>>>>>>>>
>>>>>>>>> action :
>>>>>>>>> } else if ("PROMO_GWP".equals(productPromoActionEnumId)) {
>>>>>>>>> ...
>>>>>>>>>
>>>>>>>>> This isn't really useful to manage and extend it but an idea
>>>>>>>>> raise in my
>>>>>>>>> mind :)
>>>>>>>>>
>>>>>>>>> Why not replace the enumeration by a customMethod. We can
>>>>>>>>> define a
>>>>>>>>> interface service one for action and one for condition, with
>>>>>>>>> the related
>>>>>>>>> customMethodType. Each hard coded enumeration would be convert
>>>>>>>>> to service.
>>>>>>>>>
>>>>>>>>> Like this we can surcharge the current rules easily and create
>>>>>>>>> new one
>>>>>>>>> for customer site without modify the core.
>>>>>>>>> The main strategy point would be the interface service to pass
>>>>>>>>> the good
>>>>>>>>> parameters.
>>>>>>>>>
>>>>>>>>> <ProductPromoAction productPromoId="9010"
>>>>>>>>> customMethodId="PPA_PROMO_GWP"
>>>>>>>>> .../>
>>>>>>>>> <ProductPromoCond productPromoId="9010"
>>>>>>>>> customMethodId="PPC_PRODUCT_TOTAL"
>>>>>>>>> operatorEnumId="PPC_GTE" condValue="1"/>
>>>>>>>>>
>>>>>>>>> This is easily to improve on java code, screen and data.
>>>>>>>>> What do you thinks ? Do you have an other idea to improve this ?
>>>>>>>>>
>>>>>>>>> Cheers,
>>>>>>>>> Nicolas
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>