Hi Nicolas,

Is that open, ie accessible to everyone?


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


On 30/12/2017 11:05, Nicolas Malin wrote:
Thanks for you return, yes I will try to work on POC this next year.


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

On Mon, Dec 11, 2017 at 7:20 PM, Jacques Le Roux <
jacques.le.r...@les7arts.com> 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 :)


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.


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


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

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

<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 ?


Reply via email to