Re: Overriding eca definition

2018-02-12 Thread Suraj Khurana
Thanks everyone for your inputs.

Here  is the ticket
created for this improvement.

--
Thanks and Regards,
*Suraj Khurana* | Omni-channel OMS Technical Expert
HotWax Commerce  by  HotWax Systems
Plot no. 80, Scheme no. 78, Vijay Nagar, Indore, M.P. India 452010


On Tue, Feb 13, 2018 at 12:13 AM, Taher Alkhateeb <
slidingfilame...@gmail.com> wrote:

> I was actually thinking of the same thing, I like to have more
> sophistication in the conditions to create more robust graphs of
> service calls.
>
> +1
>
> On Mon, Feb 12, 2018 at 12:08 PM, Arun Patidar
>  wrote:
> > +1 for condition service attribute.
> >
> > --
> > Thanks & Regards
> > ---
> > Arun Patidar
> > Manager, Enterprise Software Development
> >
> > www.hotwaxsystems.comwww.hotwax.co
> >
> >
> > On Sat, Feb 10, 2018 at 7:25 PM, Rishi Solanki 
> > wrote:
> >
> >> Suraj/Nicolas,
> >>
> >> IMO, There is no need to extend/override an ECA rule. ECA like we want
> to
> >> trigger something conditionally and it happens once we establish the
> rule.
> >> We can change the rule, and we are doing that frequently as per our
> custom
> >> requirement and we have calls to disable sometimes when required.
> >>
> >> +1 for having condition-service tag, it should be useful for adding more
> >> proper conditions for running EECAs.
> >>
> >> Thanks!
> >>
> >>
> >> Rishi Solanki
> >> Sr Manager, Enterprise Software Development
> >> HotWax Systems Pvt. Ltd.
> >> Direct: +91-9893287847
> >> http://www.hotwaxsystems.com
> >> www.hotwax.co
> >>
> >> On Sat, Feb 10, 2018 at 6:12 PM, Suraj Khurana <
> >> suraj.khur...@hotwaxsystems.com> wrote:
> >>
> >> > Hi Nicolas,
> >> >
> >> > I think there is a confusion here.
> >> > I am trying to find the reason why condition-service have not been
> >> > implemented for ecas?
> >> > I there is no such reason, I propose we should have a similar concept
> for
> >> > ecas as well.
> >> > So that we can write something like:
> >> >
> >> >
> >> > >> > value="ORDER_COMPLETED"/>
> >> > operator="equals"
> >> > value="Y"/>
> >> >
> >> >
> >> > 
> >> >
> >> > Here, checkForSomeCondition service must return true to proceed for
> >> > issueImmediatelyFulfilledOrder.
> >> > HTH.
> >> >
> >> > --
> >> > Thanks and Regards,
> >> > *Suraj Khurana* | Sr. Enterprise Software Engineer
> >> > *HotWax Commerce*  by  *HotWax Systems*
> >> > Plot no. 80, Scheme no. 78, Vijay Nagar, Indore, M.P. India 452010
> >> >
> >> > On Sat, Feb 10, 2018 at 1:35 PM, Nicolas Malin <
> nicolas.ma...@nereide.fr
> >> >
> >> > wrote:
> >> >
> >> > > Hello Suraj,
> >> > >
> >> > > Currently I see no possibility to override an eca because
> definitions
> >> are
> >> > > all loaded and we can have exactly two identical definition with
> >> > different
> >> > > action. In this case difficult to spot the eca to disable/improve.
> >> > >
> >> > > So before try to override an eca I suggest to implement an
> >> identification
> >> > > like :
> >> > >
> >> > >  >> event="return"
> >> > >  package="org.apache.ofbiz.accounting"
> >> > id="FinAccountTransBalanceUpda
> >> > > te">
> >> > >  >> > > value="FINACT_TRNS_APPROVED"/>
> >> > >  >> > mode="sync"/>
> >> > > 
> >> > >
> >> > > and after we would implement a new element as flying idea :
> >> > >  >> > > id="FinAccountTransBalanceUpdate">
> >> > >   
> >> > >  >> > > value="LOVE"/>
> >> > >   
> >> > > 
> >> > > or
> >> > >  >> > > id="FinAccountTransBalanceUpdate">
> >> > > or
> >> > > >> > > id="FinAccountTransBalanceUpdate">
> >> > >
> >> > >  >> > > value="LOVE"/>
> >> > > 
> >> > >
> >> > > 
> >> > >
> >> > > Nicolas
> >> > >
> >> > >
> >> > >
> >> > > On 09/02/2018 14:01, Suraj Khurana wrote:
> >> > >
> >> > >> Hello,
> >> > >>
> >> > >> What is the best way to override entity eca definition?
> >> > >> Suppose you need to add a condition-service as well in eca, as far
> as
> >> I
> >> > >> can
> >> > >> check, currently, there is no way to handle condition service in
> eca
> >> > rule.
> >> > >>
> >> > >> IMO, this could be interesting to have this thing, is it
> intentional
> >> > that
> >> > >> we do this only for seca rules and not for eca's?
> >> > >>
> >> > >> Please share your thoughts on this.
> >> > >> --
> >> > >> Thanks and Regards,
> >> > >> *Suraj Khurana* | Omnichannel OMS Technical Expert
> >> > >> *HotWax Commerce*  by  *HotWax Systems*
> >> > >> Plot no. 80, Scheme no. 78, Vijay Nagar, Indore, M.P. India 452010
> >> > >>
> >> > >>
> >> > >
> >> >
> >>
>


Re: [OFBIZ-4959] Logout do not remove autoLogin

2018-02-12 Thread Taher Alkhateeb
I just checked this code and it looks really worrying to me. You have
hard wired the ecommerce component with logic into the heart of the
framework, I think we need to review the entire body of work and maybe
revert it.

On Sat, Feb 10, 2018 at 2:38 PM, Jacques Le Roux
 wrote:
> Le 10/02/2018 à 12:33, Jacques Le Roux a écrit :
>>
>> Hi,
>>
>> Almost 6 years ago OFBIZ-4959 "Logout do not remove autoLogin" was created
>> and I closed as incomplete.
>>
>> Recently while working on OFBIZ-10206 "Security issue in Token Based
>> Authentication" which followed my work in OFBIZ-9833 "Token Based
>> Authentication" I needed a way to get the userLoginId (or userLogin) from
>> the session.
>> But, as explained in OFBIZ-10206, at this stage it was unavailable. So I
>> decided to go with autoLoginCookies. I then " remembered" OFBIZ-4959.
>>
>> So I'd like to commit the patch I provided at OFBIZ-4959. But before that
>> I want to discuss about autoLoginCookies and the feature to be sure we are
>> all on the same field.
>>
>> The auto login feature is used in ecommerce applications (ie OOTB
>> ecommerce and ecomseo) to welcome an user when s/he gets back. It does not
>> really log the user in but eases the login process. From the code, the same
>> feature exists in the webpos, I did not check.
>>
>> AutoLoginCookies are also generated for all applications, but are not used
>> for the auto login feature like in ecommerce applications. It can be
>> nevertheless useful as proves OFBIZ-10206 "Security issue in Token Based
>> Authentication". But for OFBIZ-10206 and security in general it's better to
>> remove the autoLoginCookies of the other applications (ie no ecommerce and
>> webpos) when the user logout. Of course if the user quits the session w/o
>> login out the autoLoginCookies remains so it's best to start with a clean
>> state and remove the autoLoginCookies at start.
>>
>> Without negative opinions I'll commit the OFBIZ-4959.patch in 1 week.
>>
>> Jacques
>>
>>
> Forgot to say that the autoLoginCookies have a time to live of 1 year.
>
> Jacques
>


Re: Overriding eca definition

2018-02-12 Thread Taher Alkhateeb
I was actually thinking of the same thing, I like to have more
sophistication in the conditions to create more robust graphs of
service calls.

+1

On Mon, Feb 12, 2018 at 12:08 PM, Arun Patidar
 wrote:
> +1 for condition service attribute.
>
> --
> Thanks & Regards
> ---
> Arun Patidar
> Manager, Enterprise Software Development
>
> www.hotwaxsystems.comwww.hotwax.co
>
>
> On Sat, Feb 10, 2018 at 7:25 PM, Rishi Solanki 
> wrote:
>
>> Suraj/Nicolas,
>>
>> IMO, There is no need to extend/override an ECA rule. ECA like we want to
>> trigger something conditionally and it happens once we establish the rule.
>> We can change the rule, and we are doing that frequently as per our custom
>> requirement and we have calls to disable sometimes when required.
>>
>> +1 for having condition-service tag, it should be useful for adding more
>> proper conditions for running EECAs.
>>
>> Thanks!
>>
>>
>> Rishi Solanki
>> Sr Manager, Enterprise Software Development
>> HotWax Systems Pvt. Ltd.
>> Direct: +91-9893287847
>> http://www.hotwaxsystems.com
>> www.hotwax.co
>>
>> On Sat, Feb 10, 2018 at 6:12 PM, Suraj Khurana <
>> suraj.khur...@hotwaxsystems.com> wrote:
>>
>> > Hi Nicolas,
>> >
>> > I think there is a confusion here.
>> > I am trying to find the reason why condition-service have not been
>> > implemented for ecas?
>> > I there is no such reason, I propose we should have a similar concept for
>> > ecas as well.
>> > So that we can write something like:
>> >
>> >
>> >> > value="ORDER_COMPLETED"/>
>> >> > value="Y"/>
>> >
>> >
>> > 
>> >
>> > Here, checkForSomeCondition service must return true to proceed for
>> > issueImmediatelyFulfilledOrder.
>> > HTH.
>> >
>> > --
>> > Thanks and Regards,
>> > *Suraj Khurana* | Sr. Enterprise Software Engineer
>> > *HotWax Commerce*  by  *HotWax Systems*
>> > Plot no. 80, Scheme no. 78, Vijay Nagar, Indore, M.P. India 452010
>> >
>> > On Sat, Feb 10, 2018 at 1:35 PM, Nicolas Malin > >
>> > wrote:
>> >
>> > > Hello Suraj,
>> > >
>> > > Currently I see no possibility to override an eca because definitions
>> are
>> > > all loaded and we can have exactly two identical definition with
>> > different
>> > > action. In this case difficult to spot the eca to disable/improve.
>> > >
>> > > So before try to override an eca I suggest to implement an
>> identification
>> > > like :
>> > >
>> > > > event="return"
>> > >  package="org.apache.ofbiz.accounting"
>> > id="FinAccountTransBalanceUpda
>> > > te">
>> > > > > > value="FINACT_TRNS_APPROVED"/>
>> > > > > mode="sync"/>
>> > > 
>> > >
>> > > and after we would implement a new element as flying idea :
>> > > > > > id="FinAccountTransBalanceUpdate">
>> > >   
>> > > > > > value="LOVE"/>
>> > >   
>> > > 
>> > > or
>> > > > > > id="FinAccountTransBalanceUpdate">
>> > > or
>> > >> > > id="FinAccountTransBalanceUpdate">
>> > >
>> > > > > > value="LOVE"/>
>> > > 
>> > >
>> > > 
>> > >
>> > > Nicolas
>> > >
>> > >
>> > >
>> > > On 09/02/2018 14:01, Suraj Khurana wrote:
>> > >
>> > >> Hello,
>> > >>
>> > >> What is the best way to override entity eca definition?
>> > >> Suppose you need to add a condition-service as well in eca, as far as
>> I
>> > >> can
>> > >> check, currently, there is no way to handle condition service in eca
>> > rule.
>> > >>
>> > >> IMO, this could be interesting to have this thing, is it intentional
>> > that
>> > >> we do this only for seca rules and not for eca's?
>> > >>
>> > >> Please share your thoughts on this.
>> > >> --
>> > >> Thanks and Regards,
>> > >> *Suraj Khurana* | Omnichannel OMS Technical Expert
>> > >> *HotWax Commerce*  by  *HotWax Systems*
>> > >> Plot no. 80, Scheme no. 78, Vijay Nagar, Indore, M.P. India 452010
>> > >>
>> > >>
>> > >
>> >
>>


Re: Overriding eca definition

2018-02-12 Thread Arun Patidar
+1 for condition service attribute.

-- 
Thanks & Regards
---
Arun Patidar
Manager, Enterprise Software Development

www.hotwaxsystems.comwww.hotwax.co


On Sat, Feb 10, 2018 at 7:25 PM, Rishi Solanki 
wrote:

> Suraj/Nicolas,
>
> IMO, There is no need to extend/override an ECA rule. ECA like we want to
> trigger something conditionally and it happens once we establish the rule.
> We can change the rule, and we are doing that frequently as per our custom
> requirement and we have calls to disable sometimes when required.
>
> +1 for having condition-service tag, it should be useful for adding more
> proper conditions for running EECAs.
>
> Thanks!
>
>
> Rishi Solanki
> Sr Manager, Enterprise Software Development
> HotWax Systems Pvt. Ltd.
> Direct: +91-9893287847
> http://www.hotwaxsystems.com
> www.hotwax.co
>
> On Sat, Feb 10, 2018 at 6:12 PM, Suraj Khurana <
> suraj.khur...@hotwaxsystems.com> wrote:
>
> > Hi Nicolas,
> >
> > I think there is a confusion here.
> > I am trying to find the reason why condition-service have not been
> > implemented for ecas?
> > I there is no such reason, I propose we should have a similar concept for
> > ecas as well.
> > So that we can write something like:
> >
> >
> > > value="ORDER_COMPLETED"/>
> > > value="Y"/>
> >
> >
> > 
> >
> > Here, checkForSomeCondition service must return true to proceed for
> > issueImmediatelyFulfilledOrder.
> > HTH.
> >
> > --
> > Thanks and Regards,
> > *Suraj Khurana* | Sr. Enterprise Software Engineer
> > *HotWax Commerce*  by  *HotWax Systems*
> > Plot no. 80, Scheme no. 78, Vijay Nagar, Indore, M.P. India 452010
> >
> > On Sat, Feb 10, 2018 at 1:35 PM, Nicolas Malin  >
> > wrote:
> >
> > > Hello Suraj,
> > >
> > > Currently I see no possibility to override an eca because definitions
> are
> > > all loaded and we can have exactly two identical definition with
> > different
> > > action. In this case difficult to spot the eca to disable/improve.
> > >
> > > So before try to override an eca I suggest to implement an
> identification
> > > like :
> > >
> > >  event="return"
> > >  package="org.apache.ofbiz.accounting"
> > id="FinAccountTransBalanceUpda
> > > te">
> > >  > > value="FINACT_TRNS_APPROVED"/>
> > >  > mode="sync"/>
> > > 
> > >
> > > and after we would implement a new element as flying idea :
> > >  > > id="FinAccountTransBalanceUpdate">
> > >   
> > >  > > value="LOVE"/>
> > >   
> > > 
> > > or
> > >  > > id="FinAccountTransBalanceUpdate">
> > > or
> > > > > id="FinAccountTransBalanceUpdate">
> > >
> > >  > > value="LOVE"/>
> > > 
> > >
> > > 
> > >
> > > Nicolas
> > >
> > >
> > >
> > > On 09/02/2018 14:01, Suraj Khurana wrote:
> > >
> > >> Hello,
> > >>
> > >> What is the best way to override entity eca definition?
> > >> Suppose you need to add a condition-service as well in eca, as far as
> I
> > >> can
> > >> check, currently, there is no way to handle condition service in eca
> > rule.
> > >>
> > >> IMO, this could be interesting to have this thing, is it intentional
> > that
> > >> we do this only for seca rules and not for eca's?
> > >>
> > >> Please share your thoughts on this.
> > >> --
> > >> Thanks and Regards,
> > >> *Suraj Khurana* | Omnichannel OMS Technical Expert
> > >> *HotWax Commerce*  by  *HotWax Systems*
> > >> Plot no. 80, Scheme no. 78, Vijay Nagar, Indore, M.P. India 452010
> > >>
> > >>
> > >
> >
>