Override SECA Definition

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

Override SECA Definition

Sakthivel Vellingiri
Hi All -
*Summary:*
Appreciate any pointers, Is it possible to override SECA definition by
overriding the same definition in
hot-deploy/<extended-component>/servicedef/secas.xml

*Details:*
There is a SECA definition in applications/order/servicedef/secas.xml, as
you can see noteInfo is hardcoded, and i want to replace wih my noteinfo
without touching code under applications
 <!-- send a system note to all Customer request participants (excluding
the originator)
        when a note is added to a particular customer request.-->
    <eca service="createCustRequestItemNote" event="commit">
        <set field-name="noteParty" env-name="partyId"/>
        <set field-name="noteInfo" value="A note has been added to customer
request"/>
        <set field-name="moreInfoItemName" value="custRequestId"/>
        <set field-name="moreInfoItemId" env-name="custRequestId"/>
        <set field-name="moreInfoUrl"
value="/ordermgr/control/ViewRequest"/>
        <action service="createSystemInfoNote" mode="sync"/>
    </eca>
Is it possible to achieve this by overriding this in hot-deploy that has
extended this component applications/order-extended/servicedef/secas.xml
<!-- send a system note to all Customer request participants (excluding the
originator)
        when a note is added to a particular customer request.-->
    <eca service="createCustRequestItemNote" event="commit">
        <set field-name="noteParty" env-name="partyId"/>
        <set field-name="noteInfo" value="Custom Note"/>
        <set field-name="moreInfoItemName" value="custRequestId"/>
        <set field-name="moreInfoItemId" env-name="custRequestId"/>
        <set field-name="moreInfoUrl"
value="/ordermgr/control/ViewRequest"/>
        <action service="createSystemInfoNote" mode="sync"/>
    </eca>

I had tried this without success, however i'm using this approach for
overriding services.

regards
Sakthi
Reply | Threaded
Open this post in threaded view
|

Re: Override SECA Definition

Jason RJ

On 29/05/2020 15:46, Sakthivel Vellingiri wrote:

> Hi All -
> *Summary:*
> Appreciate any pointers, Is it possible to override SECA definition by
> overriding the same definition in
> hot-deploy/<extended-component>/servicedef/secas.xml
>
> *Details:*
> There is a SECA definition in applications/order/servicedef/secas.xml, as
> you can see noteInfo is hardcoded, and i want to replace wih my noteinfo
> without touching code under applications
>   <!-- send a system note to all Customer request participants (excluding
> the originator)
>          when a note is added to a particular customer request.-->
>      <eca service="createCustRequestItemNote" event="commit">
>          <set field-name="noteParty" env-name="partyId"/>
>          <set field-name="noteInfo" value="A note has been added to customer
> request"/>
>          <set field-name="moreInfoItemName" value="custRequestId"/>
>          <set field-name="moreInfoItemId" env-name="custRequestId"/>
>          <set field-name="moreInfoUrl"
> value="/ordermgr/control/ViewRequest"/>
>          <action service="createSystemInfoNote" mode="sync"/>
>      </eca>
> Is it possible to achieve this by overriding this in hot-deploy that has
> extended this component applications/order-extended/servicedef/secas.xml
> <!-- send a system note to all Customer request participants (excluding the
> originator)
>          when a note is added to a particular customer request.-->
>      <eca service="createCustRequestItemNote" event="commit">
>          <set field-name="noteParty" env-name="partyId"/>
>          <set field-name="noteInfo" value="Custom Note"/>
>          <set field-name="moreInfoItemName" value="custRequestId"/>
>          <set field-name="moreInfoItemId" env-name="custRequestId"/>
>          <set field-name="moreInfoUrl"
> value="/ordermgr/control/ViewRequest"/>
>          <action service="createSystemInfoNote" mode="sync"/>
>      </eca>
>
> I had tried this without success, however i'm using this approach for
> overriding services.
>
> regards
> Sakthi


Hi Sakthi,

Do you have a reference to secas file in your ofbiz-component.xml:

<!-- For Service Event Control Action files, use the following -->
<service-resource type="eca" loader="main" location="servicedef/secas.xml"/>

In theory multiple SECAs can be called so both the original and yours
will be called, I'm not sure how the priority would be decided, but
hopefully core SECAs will fire first.

Jason

Reply | Threaded
Open this post in threaded view
|

Re: Override SECA Definition

Sakthivel Vellingiri
Thanks Jason for immediate response, yes we do have below in our extended
component; i understood, we could have multiple SECAs, however in this
particular case we only want our custom SECA to fire and not the original,
as we want to change the message that is passed in the original SECA
definition. hence wondering overriding the original SECA is possible which
will prevent original from running
    <service-resource type="eca" loader="main"
location="servicedef/secas.xml"/>

Sakthi

On Fri, May 29, 2020 at 10:58 AM Jason RJ <[hidden email]> wrote:

>
> On 29/05/2020 15:46, Sakthivel Vellingiri wrote:
> > Hi All -
> > *Summary:*
> > Appreciate any pointers, Is it possible to override SECA definition by
> > overriding the same definition in
> > hot-deploy/<extended-component>/servicedef/secas.xml
> >
> > *Details:*
> > There is a SECA definition in applications/order/servicedef/secas.xml, as
> > you can see noteInfo is hardcoded, and i want to replace wih my noteinfo
> > without touching code under applications
> >   <!-- send a system note to all Customer request participants (excluding
> > the originator)
> >          when a note is added to a particular customer request.-->
> >      <eca service="createCustRequestItemNote" event="commit">
> >          <set field-name="noteParty" env-name="partyId"/>
> >          <set field-name="noteInfo" value="A note has been added to
> customer
> > request"/>
> >          <set field-name="moreInfoItemName" value="custRequestId"/>
> >          <set field-name="moreInfoItemId" env-name="custRequestId"/>
> >          <set field-name="moreInfoUrl"
> > value="/ordermgr/control/ViewRequest"/>
> >          <action service="createSystemInfoNote" mode="sync"/>
> >      </eca>
> > Is it possible to achieve this by overriding this in hot-deploy that has
> > extended this component applications/order-extended/servicedef/secas.xml
> > <!-- send a system note to all Customer request participants (excluding
> the
> > originator)
> >          when a note is added to a particular customer request.-->
> >      <eca service="createCustRequestItemNote" event="commit">
> >          <set field-name="noteParty" env-name="partyId"/>
> >          <set field-name="noteInfo" value="Custom Note"/>
> >          <set field-name="moreInfoItemName" value="custRequestId"/>
> >          <set field-name="moreInfoItemId" env-name="custRequestId"/>
> >          <set field-name="moreInfoUrl"
> > value="/ordermgr/control/ViewRequest"/>
> >          <action service="createSystemInfoNote" mode="sync"/>
> >      </eca>
> >
> > I had tried this without success, however i'm using this approach for
> > overriding services.
> >
> > regards
> > Sakthi
>
>
> Hi Sakthi,
>
> Do you have a reference to secas file in your ofbiz-component.xml:
>
> <!-- For Service Event Control Action files, use the following -->
> <service-resource type="eca" loader="main"
> location="servicedef/secas.xml"/>
>
> In theory multiple SECAs can be called so both the original and yours
> will be called, I'm not sure how the priority would be decided, but
> hopefully core SECAs will fire first.
>
> Jason
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Override SECA Definition

Deepak Dixit-5
Hi Sakthi,

Which ofbiz version are you using?

You can disable seca rule, copy seca rule in custom component and set
enabled="false"
it will disable the existing seca rule.
Please refer the [1] service-eca.xsd for reference

[1] http://ofbiz.apache.org/dtds/service-eca.xsd
Thanks & Regards
--
Deepak Dixit
ofbiz.apache.org



On Fri, May 29, 2020 at 9:24 PM Sakthivel Vellingiri <
[hidden email]> wrote:

> Thanks Jason for immediate response, yes we do have below in our extended
> component; i understood, we could have multiple SECAs, however in this
> particular case we only want our custom SECA to fire and not the original,
> as we want to change the message that is passed in the original SECA
> definition. hence wondering overriding the original SECA is possible which
> will prevent original from running
>     <service-resource type="eca" loader="main"
> location="servicedef/secas.xml"/>
>
> Sakthi
>
> On Fri, May 29, 2020 at 10:58 AM Jason RJ <[hidden email]> wrote:
>
> >
> > On 29/05/2020 15:46, Sakthivel Vellingiri wrote:
> > > Hi All -
> > > *Summary:*
> > > Appreciate any pointers, Is it possible to override SECA definition by
> > > overriding the same definition in
> > > hot-deploy/<extended-component>/servicedef/secas.xml
> > >
> > > *Details:*
> > > There is a SECA definition in applications/order/servicedef/secas.xml,
> as
> > > you can see noteInfo is hardcoded, and i want to replace wih my
> noteinfo
> > > without touching code under applications
> > >   <!-- send a system note to all Customer request participants
> (excluding
> > > the originator)
> > >          when a note is added to a particular customer request.-->
> > >      <eca service="createCustRequestItemNote" event="commit">
> > >          <set field-name="noteParty" env-name="partyId"/>
> > >          <set field-name="noteInfo" value="A note has been added to
> > customer
> > > request"/>
> > >          <set field-name="moreInfoItemName" value="custRequestId"/>
> > >          <set field-name="moreInfoItemId" env-name="custRequestId"/>
> > >          <set field-name="moreInfoUrl"
> > > value="/ordermgr/control/ViewRequest"/>
> > >          <action service="createSystemInfoNote" mode="sync"/>
> > >      </eca>
> > > Is it possible to achieve this by overriding this in hot-deploy that
> has
> > > extended this component
> applications/order-extended/servicedef/secas.xml
> > > <!-- send a system note to all Customer request participants (excluding
> > the
> > > originator)
> > >          when a note is added to a particular customer request.-->
> > >      <eca service="createCustRequestItemNote" event="commit">
> > >          <set field-name="noteParty" env-name="partyId"/>
> > >          <set field-name="noteInfo" value="Custom Note"/>
> > >          <set field-name="moreInfoItemName" value="custRequestId"/>
> > >          <set field-name="moreInfoItemId" env-name="custRequestId"/>
> > >          <set field-name="moreInfoUrl"
> > > value="/ordermgr/control/ViewRequest"/>
> > >          <action service="createSystemInfoNote" mode="sync"/>
> > >      </eca>
> > >
> > > I had tried this without success, however i'm using this approach for
> > > overriding services.
> > >
> > > regards
> > > Sakthi
> >
> >
> > Hi Sakthi,
> >
> > Do you have a reference to secas file in your ofbiz-component.xml:
> >
> > <!-- For Service Event Control Action files, use the following -->
> > <service-resource type="eca" loader="main"
> > location="servicedef/secas.xml"/>
> >
> > In theory multiple SECAs can be called so both the original and yours
> > will be called, I'm not sure how the priority would be decided, but
> > hopefully core SECAs will fire first.
> >
> > Jason
> >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Override SECA Definition

Sakthivel Vellingiri
Thanks Deepak for your prompt response, that looked promising, however i
could not get that to work when i copied the SECA to my customComponent
(that extended order) and added enabled="false", but that did not suppress
the existing SECA, Just for verification i added enabled="false" in the
original order component itself but for whatever reason that did not work
either, BTW, i'm still on 12.04.03, yea it is long due for upgrade :(; it
is possible it is fixed in a later version, but for now i have created a
new SECA in my customComponent (that extended order) with a different event
i.e. event="return" instead of event="commit", that created an additional
event with the message that i need, however it did not suppress the
original event/message, but i guess will have to live with that or comment
out the original SECA in the original order component. But i really
appreciate your time to answer my question.

Sakthi




On Mon, Jun 1, 2020 at 1:52 AM Deepak Dixit <[hidden email]> wrote:

> Hi Sakthi,
>
> Which ofbiz version are you using?
>
> You can disable seca rule, copy seca rule in custom component and set
> enabled="false"
> it will disable the existing seca rule.
> Please refer the [1] service-eca.xsd for reference
>
> [1] http://ofbiz.apache.org/dtds/service-eca.xsd
> Thanks & Regards
> --
> Deepak Dixit
> ofbiz.apache.org
>
>
>
> On Fri, May 29, 2020 at 9:24 PM Sakthivel Vellingiri <
> [hidden email]> wrote:
>
> > Thanks Jason for immediate response, yes we do have below in our extended
> > component; i understood, we could have multiple SECAs, however in this
> > particular case we only want our custom SECA to fire and not the
> original,
> > as we want to change the message that is passed in the original SECA
> > definition. hence wondering overriding the original SECA is possible
> which
> > will prevent original from running
> >     <service-resource type="eca" loader="main"
> > location="servicedef/secas.xml"/>
> >
> > Sakthi
> >
> > On Fri, May 29, 2020 at 10:58 AM Jason RJ <[hidden email]> wrote:
> >
> > >
> > > On 29/05/2020 15:46, Sakthivel Vellingiri wrote:
> > > > Hi All -
> > > > *Summary:*
> > > > Appreciate any pointers, Is it possible to override SECA definition
> by
> > > > overriding the same definition in
> > > > hot-deploy/<extended-component>/servicedef/secas.xml
> > > >
> > > > *Details:*
> > > > There is a SECA definition in
> applications/order/servicedef/secas.xml,
> > as
> > > > you can see noteInfo is hardcoded, and i want to replace wih my
> > noteinfo
> > > > without touching code under applications
> > > >   <!-- send a system note to all Customer request participants
> > (excluding
> > > > the originator)
> > > >          when a note is added to a particular customer request.-->
> > > >      <eca service="createCustRequestItemNote" event="commit">
> > > >          <set field-name="noteParty" env-name="partyId"/>
> > > >          <set field-name="noteInfo" value="A note has been added to
> > > customer
> > > > request"/>
> > > >          <set field-name="moreInfoItemName" value="custRequestId"/>
> > > >          <set field-name="moreInfoItemId" env-name="custRequestId"/>
> > > >          <set field-name="moreInfoUrl"
> > > > value="/ordermgr/control/ViewRequest"/>
> > > >          <action service="createSystemInfoNote" mode="sync"/>
> > > >      </eca>
> > > > Is it possible to achieve this by overriding this in hot-deploy that
> > has
> > > > extended this component
> > applications/order-extended/servicedef/secas.xml
> > > > <!-- send a system note to all Customer request participants
> (excluding
> > > the
> > > > originator)
> > > >          when a note is added to a particular customer request.-->
> > > >      <eca service="createCustRequestItemNote" event="commit">
> > > >          <set field-name="noteParty" env-name="partyId"/>
> > > >          <set field-name="noteInfo" value="Custom Note"/>
> > > >          <set field-name="moreInfoItemName" value="custRequestId"/>
> > > >          <set field-name="moreInfoItemId" env-name="custRequestId"/>
> > > >          <set field-name="moreInfoUrl"
> > > > value="/ordermgr/control/ViewRequest"/>
> > > >          <action service="createSystemInfoNote" mode="sync"/>
> > > >      </eca>
> > > >
> > > > I had tried this without success, however i'm using this approach for
> > > > overriding services.
> > > >
> > > > regards
> > > > Sakthi
> > >
> > >
> > > Hi Sakthi,
> > >
> > > Do you have a reference to secas file in your ofbiz-component.xml:
> > >
> > > <!-- For Service Event Control Action files, use the following -->
> > > <service-resource type="eca" loader="main"
> > > location="servicedef/secas.xml"/>
> > >
> > > In theory multiple SECAs can be called so both the original and yours
> > > will be called, I'm not sure how the priority would be decided, but
> > > hopefully core SECAs will fire first.
> > >
> > > Jason
> > >
> > >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Override SECA Definition

Devanshu Vyas-2
Hello Sakthi,

I know many people don't like to maintain a patch for such trivial things.
But, you could definitely remove/update the original SECA and maintain a
patch in your project.
This way only the original SECA will run as per your needs and you will not
need to override SECA or define a new one in your custom component.

HTH!

Thanks & Regards,
Devanshu Vyas.


On Tue, Jun 2, 2020 at 8:50 AM Sakthivel Vellingiri <[hidden email]>
wrote:

> Thanks Deepak for your prompt response, that looked promising, however i
> could not get that to work when i copied the SECA to my customComponent
> (that extended order) and added enabled="false", but that did not suppress
> the existing SECA, Just for verification i added enabled="false" in the
> original order component itself but for whatever reason that did not work
> either, BTW, i'm still on 12.04.03, yea it is long due for upgrade :(; it
> is possible it is fixed in a later version, but for now i have created a
> new SECA in my customComponent (that extended order) with a different event
> i.e. event="return" instead of event="commit", that created an additional
> event with the message that i need, however it did not suppress the
> original event/message, but i guess will have to live with that or comment
> out the original SECA in the original order component. But i really
> appreciate your time to answer my question.
>
> Sakthi
>
>
>
>
> On Mon, Jun 1, 2020 at 1:52 AM Deepak Dixit <[hidden email]> wrote:
>
> > Hi Sakthi,
> >
> > Which ofbiz version are you using?
> >
> > You can disable seca rule, copy seca rule in custom component and set
> > enabled="false"
> > it will disable the existing seca rule.
> > Please refer the [1] service-eca.xsd for reference
> >
> > [1] http://ofbiz.apache.org/dtds/service-eca.xsd
> > Thanks & Regards
> > --
> > Deepak Dixit
> > ofbiz.apache.org
> >
> >
> >
> > On Fri, May 29, 2020 at 9:24 PM Sakthivel Vellingiri <
> > [hidden email]> wrote:
> >
> > > Thanks Jason for immediate response, yes we do have below in our
> extended
> > > component; i understood, we could have multiple SECAs, however in this
> > > particular case we only want our custom SECA to fire and not the
> > original,
> > > as we want to change the message that is passed in the original SECA
> > > definition. hence wondering overriding the original SECA is possible
> > which
> > > will prevent original from running
> > >     <service-resource type="eca" loader="main"
> > > location="servicedef/secas.xml"/>
> > >
> > > Sakthi
> > >
> > > On Fri, May 29, 2020 at 10:58 AM Jason RJ <[hidden email]>
> wrote:
> > >
> > > >
> > > > On 29/05/2020 15:46, Sakthivel Vellingiri wrote:
> > > > > Hi All -
> > > > > *Summary:*
> > > > > Appreciate any pointers, Is it possible to override SECA definition
> > by
> > > > > overriding the same definition in
> > > > > hot-deploy/<extended-component>/servicedef/secas.xml
> > > > >
> > > > > *Details:*
> > > > > There is a SECA definition in
> > applications/order/servicedef/secas.xml,
> > > as
> > > > > you can see noteInfo is hardcoded, and i want to replace wih my
> > > noteinfo
> > > > > without touching code under applications
> > > > >   <!-- send a system note to all Customer request participants
> > > (excluding
> > > > > the originator)
> > > > >          when a note is added to a particular customer request.-->
> > > > >      <eca service="createCustRequestItemNote" event="commit">
> > > > >          <set field-name="noteParty" env-name="partyId"/>
> > > > >          <set field-name="noteInfo" value="A note has been added to
> > > > customer
> > > > > request"/>
> > > > >          <set field-name="moreInfoItemName" value="custRequestId"/>
> > > > >          <set field-name="moreInfoItemId"
> env-name="custRequestId"/>
> > > > >          <set field-name="moreInfoUrl"
> > > > > value="/ordermgr/control/ViewRequest"/>
> > > > >          <action service="createSystemInfoNote" mode="sync"/>
> > > > >      </eca>
> > > > > Is it possible to achieve this by overriding this in hot-deploy
> that
> > > has
> > > > > extended this component
> > > applications/order-extended/servicedef/secas.xml
> > > > > <!-- send a system note to all Customer request participants
> > (excluding
> > > > the
> > > > > originator)
> > > > >          when a note is added to a particular customer request.-->
> > > > >      <eca service="createCustRequestItemNote" event="commit">
> > > > >          <set field-name="noteParty" env-name="partyId"/>
> > > > >          <set field-name="noteInfo" value="Custom Note"/>
> > > > >          <set field-name="moreInfoItemName" value="custRequestId"/>
> > > > >          <set field-name="moreInfoItemId"
> env-name="custRequestId"/>
> > > > >          <set field-name="moreInfoUrl"
> > > > > value="/ordermgr/control/ViewRequest"/>
> > > > >          <action service="createSystemInfoNote" mode="sync"/>
> > > > >      </eca>
> > > > >
> > > > > I had tried this without success, however i'm using this approach
> for
> > > > > overriding services.
> > > > >
> > > > > regards
> > > > > Sakthi
> > > >
> > > >
> > > > Hi Sakthi,
> > > >
> > > > Do you have a reference to secas file in your ofbiz-component.xml:
> > > >
> > > > <!-- For Service Event Control Action files, use the following -->
> > > > <service-resource type="eca" loader="main"
> > > > location="servicedef/secas.xml"/>
> > > >
> > > > In theory multiple SECAs can be called so both the original and yours
> > > > will be called, I'm not sure how the priority would be decided, but
> > > > hopefully core SECAs will fire first.
> > > >
> > > > Jason
> > > >
> > > >
> > >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Override SECA Definition

Deepak Dixit-5
In reply to this post by Sakthivel Vellingiri
Hi Sakthi,

Yes, disable seca feature added in 17.12 release.

Thanks & Regards
--
Deepak Dixit
ofbiz.apache.org


On Tue, Jun 2, 2020 at 8:50 AM Sakthivel Vellingiri <[hidden email]>
wrote:

> Thanks Deepak for your prompt response, that looked promising, however i
> could not get that to work when i copied the SECA to my customComponent
> (that extended order) and added enabled="false", but that did not suppress
> the existing SECA, Just for verification i added enabled="false" in the
> original order component itself but for whatever reason that did not work
> either, BTW, i'm still on 12.04.03, yea it is long due for upgrade :(; it
> is possible it is fixed in a later version, but for now i have created a
> new SECA in my customComponent (that extended order) with a different event
> i.e. event="return" instead of event="commit", that created an additional
> event with the message that i need, however it did not suppress the
> original event/message, but i guess will have to live with that or comment
> out the original SECA in the original order component. But i really
> appreciate your time to answer my question.
>
> Sakthi
>
>
>
>
> On Mon, Jun 1, 2020 at 1:52 AM Deepak Dixit <[hidden email]> wrote:
>
> > Hi Sakthi,
> >
> > Which ofbiz version are you using?
> >
> > You can disable seca rule, copy seca rule in custom component and set
> > enabled="false"
> > it will disable the existing seca rule.
> > Please refer the [1] service-eca.xsd for reference
> >
> > [1] http://ofbiz.apache.org/dtds/service-eca.xsd
> > Thanks & Regards
> > --
> > Deepak Dixit
> > ofbiz.apache.org
> >
> >
> >
> > On Fri, May 29, 2020 at 9:24 PM Sakthivel Vellingiri <
> > [hidden email]> wrote:
> >
> > > Thanks Jason for immediate response, yes we do have below in our
> extended
> > > component; i understood, we could have multiple SECAs, however in this
> > > particular case we only want our custom SECA to fire and not the
> > original,
> > > as we want to change the message that is passed in the original SECA
> > > definition. hence wondering overriding the original SECA is possible
> > which
> > > will prevent original from running
> > >     <service-resource type="eca" loader="main"
> > > location="servicedef/secas.xml"/>
> > >
> > > Sakthi
> > >
> > > On Fri, May 29, 2020 at 10:58 AM Jason RJ <[hidden email]>
> wrote:
> > >
> > > >
> > > > On 29/05/2020 15:46, Sakthivel Vellingiri wrote:
> > > > > Hi All -
> > > > > *Summary:*
> > > > > Appreciate any pointers, Is it possible to override SECA definition
> > by
> > > > > overriding the same definition in
> > > > > hot-deploy/<extended-component>/servicedef/secas.xml
> > > > >
> > > > > *Details:*
> > > > > There is a SECA definition in
> > applications/order/servicedef/secas.xml,
> > > as
> > > > > you can see noteInfo is hardcoded, and i want to replace wih my
> > > noteinfo
> > > > > without touching code under applications
> > > > >   <!-- send a system note to all Customer request participants
> > > (excluding
> > > > > the originator)
> > > > >          when a note is added to a particular customer request.-->
> > > > >      <eca service="createCustRequestItemNote" event="commit">
> > > > >          <set field-name="noteParty" env-name="partyId"/>
> > > > >          <set field-name="noteInfo" value="A note has been added to
> > > > customer
> > > > > request"/>
> > > > >          <set field-name="moreInfoItemName" value="custRequestId"/>
> > > > >          <set field-name="moreInfoItemId"
> env-name="custRequestId"/>
> > > > >          <set field-name="moreInfoUrl"
> > > > > value="/ordermgr/control/ViewRequest"/>
> > > > >          <action service="createSystemInfoNote" mode="sync"/>
> > > > >      </eca>
> > > > > Is it possible to achieve this by overriding this in hot-deploy
> that
> > > has
> > > > > extended this component
> > > applications/order-extended/servicedef/secas.xml
> > > > > <!-- send a system note to all Customer request participants
> > (excluding
> > > > the
> > > > > originator)
> > > > >          when a note is added to a particular customer request.-->
> > > > >      <eca service="createCustRequestItemNote" event="commit">
> > > > >          <set field-name="noteParty" env-name="partyId"/>
> > > > >          <set field-name="noteInfo" value="Custom Note"/>
> > > > >          <set field-name="moreInfoItemName" value="custRequestId"/>
> > > > >          <set field-name="moreInfoItemId"
> env-name="custRequestId"/>
> > > > >          <set field-name="moreInfoUrl"
> > > > > value="/ordermgr/control/ViewRequest"/>
> > > > >          <action service="createSystemInfoNote" mode="sync"/>
> > > > >      </eca>
> > > > >
> > > > > I had tried this without success, however i'm using this approach
> for
> > > > > overriding services.
> > > > >
> > > > > regards
> > > > > Sakthi
> > > >
> > > >
> > > > Hi Sakthi,
> > > >
> > > > Do you have a reference to secas file in your ofbiz-component.xml:
> > > >
> > > > <!-- For Service Event Control Action files, use the following -->
> > > > <service-resource type="eca" loader="main"
> > > > location="servicedef/secas.xml"/>
> > > >
> > > > In theory multiple SECAs can be called so both the original and yours
> > > > will be called, I'm not sure how the priority would be decided, but
> > > > hopefully core SECAs will fire first.
> > > >
> > > > Jason
> > > >
> > > >
> > >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Override SECA Definition

Sakthivel Vellingiri
In reply to this post by Devanshu Vyas-2
Thanks Devanshu for the response, As you pointed out, we have managed so
far without making any changes to the OOTB code using extensions, given
that OFBIZ has a powerful extension mechanism, so that it will be easier
during upgrade, Just wanted to confirm if extension is supported for SECA,
Based on my testing it appears like, extension is not supported in the
version that we are on 12.04.03

regards

On Tue, Jun 2, 2020 at 2:16 AM Devanshu Vyas <[hidden email]>
wrote:

> Hello Sakthi,
>
> I know many people don't like to maintain a patch for such trivial things.
> But, you could definitely remove/update the original SECA and maintain a
> patch in your project.
> This way only the original SECA will run as per your needs and you will not
> need to override SECA or define a new one in your custom component.
>
> HTH!
>
> Thanks & Regards,
> Devanshu Vyas.
>
>
> On Tue, Jun 2, 2020 at 8:50 AM Sakthivel Vellingiri <
> [hidden email]>
> wrote:
>
> > Thanks Deepak for your prompt response, that looked promising, however i
> > could not get that to work when i copied the SECA to my customComponent
> > (that extended order) and added enabled="false", but that did not
> suppress
> > the existing SECA, Just for verification i added enabled="false" in the
> > original order component itself but for whatever reason that did not work
> > either, BTW, i'm still on 12.04.03, yea it is long due for upgrade :(; it
> > is possible it is fixed in a later version, but for now i have created a
> > new SECA in my customComponent (that extended order) with a different
> event
> > i.e. event="return" instead of event="commit", that created an additional
> > event with the message that i need, however it did not suppress the
> > original event/message, but i guess will have to live with that or
> comment
> > out the original SECA in the original order component. But i really
> > appreciate your time to answer my question.
> >
> > Sakthi
> >
> >
> >
> >
> > On Mon, Jun 1, 2020 at 1:52 AM Deepak Dixit <[hidden email]> wrote:
> >
> > > Hi Sakthi,
> > >
> > > Which ofbiz version are you using?
> > >
> > > You can disable seca rule, copy seca rule in custom component and set
> > > enabled="false"
> > > it will disable the existing seca rule.
> > > Please refer the [1] service-eca.xsd for reference
> > >
> > > [1] http://ofbiz.apache.org/dtds/service-eca.xsd
> > > Thanks & Regards
> > > --
> > > Deepak Dixit
> > > ofbiz.apache.org
> > >
> > >
> > >
> > > On Fri, May 29, 2020 at 9:24 PM Sakthivel Vellingiri <
> > > [hidden email]> wrote:
> > >
> > > > Thanks Jason for immediate response, yes we do have below in our
> > extended
> > > > component; i understood, we could have multiple SECAs, however in
> this
> > > > particular case we only want our custom SECA to fire and not the
> > > original,
> > > > as we want to change the message that is passed in the original SECA
> > > > definition. hence wondering overriding the original SECA is possible
> > > which
> > > > will prevent original from running
> > > >     <service-resource type="eca" loader="main"
> > > > location="servicedef/secas.xml"/>
> > > >
> > > > Sakthi
> > > >
> > > > On Fri, May 29, 2020 at 10:58 AM Jason RJ <[hidden email]>
> > wrote:
> > > >
> > > > >
> > > > > On 29/05/2020 15:46, Sakthivel Vellingiri wrote:
> > > > > > Hi All -
> > > > > > *Summary:*
> > > > > > Appreciate any pointers, Is it possible to override SECA
> definition
> > > by
> > > > > > overriding the same definition in
> > > > > > hot-deploy/<extended-component>/servicedef/secas.xml
> > > > > >
> > > > > > *Details:*
> > > > > > There is a SECA definition in
> > > applications/order/servicedef/secas.xml,
> > > > as
> > > > > > you can see noteInfo is hardcoded, and i want to replace wih my
> > > > noteinfo
> > > > > > without touching code under applications
> > > > > >   <!-- send a system note to all Customer request participants
> > > > (excluding
> > > > > > the originator)
> > > > > >          when a note is added to a particular customer
> request.-->
> > > > > >      <eca service="createCustRequestItemNote" event="commit">
> > > > > >          <set field-name="noteParty" env-name="partyId"/>
> > > > > >          <set field-name="noteInfo" value="A note has been added
> to
> > > > > customer
> > > > > > request"/>
> > > > > >          <set field-name="moreInfoItemName"
> value="custRequestId"/>
> > > > > >          <set field-name="moreInfoItemId"
> > env-name="custRequestId"/>
> > > > > >          <set field-name="moreInfoUrl"
> > > > > > value="/ordermgr/control/ViewRequest"/>
> > > > > >          <action service="createSystemInfoNote" mode="sync"/>
> > > > > >      </eca>
> > > > > > Is it possible to achieve this by overriding this in hot-deploy
> > that
> > > > has
> > > > > > extended this component
> > > > applications/order-extended/servicedef/secas.xml
> > > > > > <!-- send a system note to all Customer request participants
> > > (excluding
> > > > > the
> > > > > > originator)
> > > > > >          when a note is added to a particular customer
> request.-->
> > > > > >      <eca service="createCustRequestItemNote" event="commit">
> > > > > >          <set field-name="noteParty" env-name="partyId"/>
> > > > > >          <set field-name="noteInfo" value="Custom Note"/>
> > > > > >          <set field-name="moreInfoItemName"
> value="custRequestId"/>
> > > > > >          <set field-name="moreInfoItemId"
> > env-name="custRequestId"/>
> > > > > >          <set field-name="moreInfoUrl"
> > > > > > value="/ordermgr/control/ViewRequest"/>
> > > > > >          <action service="createSystemInfoNote" mode="sync"/>
> > > > > >      </eca>
> > > > > >
> > > > > > I had tried this without success, however i'm using this approach
> > for
> > > > > > overriding services.
> > > > > >
> > > > > > regards
> > > > > > Sakthi
> > > > >
> > > > >
> > > > > Hi Sakthi,
> > > > >
> > > > > Do you have a reference to secas file in your ofbiz-component.xml:
> > > > >
> > > > > <!-- For Service Event Control Action files, use the following -->
> > > > > <service-resource type="eca" loader="main"
> > > > > location="servicedef/secas.xml"/>
> > > > >
> > > > > In theory multiple SECAs can be called so both the original and
> yours
> > > > > will be called, I'm not sure how the priority would be decided, but
> > > > > hopefully core SECAs will fire first.
> > > > >
> > > > > Jason
> > > > >
> > > > >
> > > >
> > >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Override SECA Definition

Sakthivel Vellingiri
In reply to this post by Deepak Dixit-5
Great Deepak, thanks for the follow through, After your message i was able
to locate the Jira -> https://issues.apache.org/jira/browse/OFBIZ-9826 and
this is exactly the feature that i was looking for, We are scheduled to
upgrade to 17.12 by the end of the year and we should be good by then,
Appreciate your time & effort

regards
Sakthi

On Tue, Jun 2, 2020 at 7:42 AM Deepak Dixit <[hidden email]> wrote:

> Hi Sakthi,
>
> Yes, disable seca feature added in 17.12 release.
>
> Thanks & Regards
> --
> Deepak Dixit
> ofbiz.apache.org
>
>
> On Tue, Jun 2, 2020 at 8:50 AM Sakthivel Vellingiri <
> [hidden email]>
> wrote:
>
> > Thanks Deepak for your prompt response, that looked promising, however i
> > could not get that to work when i copied the SECA to my customComponent
> > (that extended order) and added enabled="false", but that did not
> suppress
> > the existing SECA, Just for verification i added enabled="false" in the
> > original order component itself but for whatever reason that did not work
> > either, BTW, i'm still on 12.04.03, yea it is long due for upgrade :(; it
> > is possible it is fixed in a later version, but for now i have created a
> > new SECA in my customComponent (that extended order) with a different
> event
> > i.e. event="return" instead of event="commit", that created an additional
> > event with the message that i need, however it did not suppress the
> > original event/message, but i guess will have to live with that or
> comment
> > out the original SECA in the original order component. But i really
> > appreciate your time to answer my question.
> >
> > Sakthi
> >
> >
> >
> >
> > On Mon, Jun 1, 2020 at 1:52 AM Deepak Dixit <[hidden email]> wrote:
> >
> > > Hi Sakthi,
> > >
> > > Which ofbiz version are you using?
> > >
> > > You can disable seca rule, copy seca rule in custom component and set
> > > enabled="false"
> > > it will disable the existing seca rule.
> > > Please refer the [1] service-eca.xsd for reference
> > >
> > > [1] http://ofbiz.apache.org/dtds/service-eca.xsd
> > > Thanks & Regards
> > > --
> > > Deepak Dixit
> > > ofbiz.apache.org
> > >
> > >
> > >
> > > On Fri, May 29, 2020 at 9:24 PM Sakthivel Vellingiri <
> > > [hidden email]> wrote:
> > >
> > > > Thanks Jason for immediate response, yes we do have below in our
> > extended
> > > > component; i understood, we could have multiple SECAs, however in
> this
> > > > particular case we only want our custom SECA to fire and not the
> > > original,
> > > > as we want to change the message that is passed in the original SECA
> > > > definition. hence wondering overriding the original SECA is possible
> > > which
> > > > will prevent original from running
> > > >     <service-resource type="eca" loader="main"
> > > > location="servicedef/secas.xml"/>
> > > >
> > > > Sakthi
> > > >
> > > > On Fri, May 29, 2020 at 10:58 AM Jason RJ <[hidden email]>
> > wrote:
> > > >
> > > > >
> > > > > On 29/05/2020 15:46, Sakthivel Vellingiri wrote:
> > > > > > Hi All -
> > > > > > *Summary:*
> > > > > > Appreciate any pointers, Is it possible to override SECA
> definition
> > > by
> > > > > > overriding the same definition in
> > > > > > hot-deploy/<extended-component>/servicedef/secas.xml
> > > > > >
> > > > > > *Details:*
> > > > > > There is a SECA definition in
> > > applications/order/servicedef/secas.xml,
> > > > as
> > > > > > you can see noteInfo is hardcoded, and i want to replace wih my
> > > > noteinfo
> > > > > > without touching code under applications
> > > > > >   <!-- send a system note to all Customer request participants
> > > > (excluding
> > > > > > the originator)
> > > > > >          when a note is added to a particular customer
> request.-->
> > > > > >      <eca service="createCustRequestItemNote" event="commit">
> > > > > >          <set field-name="noteParty" env-name="partyId"/>
> > > > > >          <set field-name="noteInfo" value="A note has been added
> to
> > > > > customer
> > > > > > request"/>
> > > > > >          <set field-name="moreInfoItemName"
> value="custRequestId"/>
> > > > > >          <set field-name="moreInfoItemId"
> > env-name="custRequestId"/>
> > > > > >          <set field-name="moreInfoUrl"
> > > > > > value="/ordermgr/control/ViewRequest"/>
> > > > > >          <action service="createSystemInfoNote" mode="sync"/>
> > > > > >      </eca>
> > > > > > Is it possible to achieve this by overriding this in hot-deploy
> > that
> > > > has
> > > > > > extended this component
> > > > applications/order-extended/servicedef/secas.xml
> > > > > > <!-- send a system note to all Customer request participants
> > > (excluding
> > > > > the
> > > > > > originator)
> > > > > >          when a note is added to a particular customer
> request.-->
> > > > > >      <eca service="createCustRequestItemNote" event="commit">
> > > > > >          <set field-name="noteParty" env-name="partyId"/>
> > > > > >          <set field-name="noteInfo" value="Custom Note"/>
> > > > > >          <set field-name="moreInfoItemName"
> value="custRequestId"/>
> > > > > >          <set field-name="moreInfoItemId"
> > env-name="custRequestId"/>
> > > > > >          <set field-name="moreInfoUrl"
> > > > > > value="/ordermgr/control/ViewRequest"/>
> > > > > >          <action service="createSystemInfoNote" mode="sync"/>
> > > > > >      </eca>
> > > > > >
> > > > > > I had tried this without success, however i'm using this approach
> > for
> > > > > > overriding services.
> > > > > >
> > > > > > regards
> > > > > > Sakthi
> > > > >
> > > > >
> > > > > Hi Sakthi,
> > > > >
> > > > > Do you have a reference to secas file in your ofbiz-component.xml:
> > > > >
> > > > > <!-- For Service Event Control Action files, use the following -->
> > > > > <service-resource type="eca" loader="main"
> > > > > location="servicedef/secas.xml"/>
> > > > >
> > > > > In theory multiple SECAs can be called so both the original and
> yours
> > > > > will be called, I'm not sure how the priority would be decided, but
> > > > > hopefully core SECAs will fire first.
> > > > >
> > > > > Jason
> > > > >
> > > > >
> > > >
> > >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Override SECA Definition

Sakthivel Vellingiri
Deepak / Framework Gurus -
Sorry to dig this from the grave, we are upgrading to 17.12 and wanted to
leverage the *enabled="false" *attribute for disabling some OOTB eca rules,
and have run into a question, there are 4 OOTB eca rules in scrum that i
would like to disable, because they are configured for CustRequest >>
Status that is interfering with our custom workflow that is planning to
leverage CustRequest;

Below are the OOTB rules on *service=setCustRequestStatus and
event="commit"*; My understanding is that to disable all the rules with
same service and event i just have to create ONE overriding  rule for
*service="setCustRequestStatus"
event="commit" *and do not have to override *each rule separately *pls can
you provide some insights

 <eca service="setCustRequestStatus" event="commit">
        <condition field-name="oldStatusId" operator="equals"
value="CRQ_REVIEWED"/>
        <condition operator="equals" field-name="statusId"
value="CRQ_ACCEPTED"/>
        <set field-name="custRequestStatusId" value="CRQ_ACCEPTED"/>
        <set field-name="webSiteId" env-name="webSiteId"/>
        <action service="autoScrumNotification" mode="sync"/>
    </eca>
    <eca service="setCustRequestStatus" event="commit">
        <condition operator="equals" field-name="statusId"
value="CRQ_REVIEWED"/>
        <set field-name="custRequestStatusId" value="CRQ_REVIEWED"/>
        <set field-name="webSiteId" env-name="webSiteId"/>
        <action service="autoScrumNotification" mode="sync"/>
    </eca>
    <eca service="setCustRequestStatus" event="commit">
        <condition operator="equals" field-name="statusId"
value="CRQ_COMPLETED"/>
        <set field-name="custRequestStatusId" value="CRQ_COMPLETED"/>
        <set field-name="webSiteId" env-name="webSiteId"/>
        <action service="autoScrumNotification" mode="sync"/>
    </eca>
    <eca service="setCustRequestStatus" event="commit">
        <condition operator="equals" field-name="statusId"
value="CRQ_CANCELLED"/>
        <set field-name="custRequestStatusId" value="CRQ_CANCELLED"/>
        <set field-name="webSiteId" env-name="webSiteId"/>
        <action service="autoScrumNotification" mode="sync"/>
    </eca>

regards
Sakthi


On Tue, Jun 2, 2020 at 9:25 AM Sakthivel Vellingiri <[hidden email]>
wrote:

> Great Deepak, thanks for the follow through, After your message i was able
> to locate the Jira -> https://issues.apache.org/jira/browse/OFBIZ-9826 and
> this is exactly the feature that i was looking for, We are scheduled to
> upgrade to 17.12 by the end of the year and we should be good by then,
> Appreciate your time & effort
>
> regards
> Sakthi
>
> On Tue, Jun 2, 2020 at 7:42 AM Deepak Dixit <[hidden email]> wrote:
>
>> Hi Sakthi,
>>
>> Yes, disable seca feature added in 17.12 release.
>>
>> Thanks & Regards
>> --
>> Deepak Dixit
>> ofbiz.apache.org
>>
>>
>> On Tue, Jun 2, 2020 at 8:50 AM Sakthivel Vellingiri <
>> [hidden email]>
>> wrote:
>>
>> > Thanks Deepak for your prompt response, that looked promising, however i
>> > could not get that to work when i copied the SECA to my customComponent
>> > (that extended order) and added enabled="false", but that did not
>> suppress
>> > the existing SECA, Just for verification i added enabled="false" in the
>> > original order component itself but for whatever reason that did not
>> work
>> > either, BTW, i'm still on 12.04.03, yea it is long due for upgrade :(;
>> it
>> > is possible it is fixed in a later version, but for now i have created a
>> > new SECA in my customComponent (that extended order) with a different
>> event
>> > i.e. event="return" instead of event="commit", that created an
>> additional
>> > event with the message that i need, however it did not suppress the
>> > original event/message, but i guess will have to live with that or
>> comment
>> > out the original SECA in the original order component. But i really
>> > appreciate your time to answer my question.
>> >
>> > Sakthi
>> >
>> >
>> >
>> >
>> > On Mon, Jun 1, 2020 at 1:52 AM Deepak Dixit <[hidden email]> wrote:
>> >
>> > > Hi Sakthi,
>> > >
>> > > Which ofbiz version are you using?
>> > >
>> > > You can disable seca rule, copy seca rule in custom component and set
>> > > enabled="false"
>> > > it will disable the existing seca rule.
>> > > Please refer the [1] service-eca.xsd for reference
>> > >
>> > > [1] http://ofbiz.apache.org/dtds/service-eca.xsd
>> > > Thanks & Regards
>> > > --
>> > > Deepak Dixit
>> > > ofbiz.apache.org
>> > >
>> > >
>> > >
>> > > On Fri, May 29, 2020 at 9:24 PM Sakthivel Vellingiri <
>> > > [hidden email]> wrote:
>> > >
>> > > > Thanks Jason for immediate response, yes we do have below in our
>> > extended
>> > > > component; i understood, we could have multiple SECAs, however in
>> this
>> > > > particular case we only want our custom SECA to fire and not the
>> > > original,
>> > > > as we want to change the message that is passed in the original SECA
>> > > > definition. hence wondering overriding the original SECA is possible
>> > > which
>> > > > will prevent original from running
>> > > >     <service-resource type="eca" loader="main"
>> > > > location="servicedef/secas.xml"/>
>> > > >
>> > > > Sakthi
>> > > >
>> > > > On Fri, May 29, 2020 at 10:58 AM Jason RJ <[hidden email]>
>> > wrote:
>> > > >
>> > > > >
>> > > > > On 29/05/2020 15:46, Sakthivel Vellingiri wrote:
>> > > > > > Hi All -
>> > > > > > *Summary:*
>> > > > > > Appreciate any pointers, Is it possible to override SECA
>> definition
>> > > by
>> > > > > > overriding the same definition in
>> > > > > > hot-deploy/<extended-component>/servicedef/secas.xml
>> > > > > >
>> > > > > > *Details:*
>> > > > > > There is a SECA definition in
>> > > applications/order/servicedef/secas.xml,
>> > > > as
>> > > > > > you can see noteInfo is hardcoded, and i want to replace wih my
>> > > > noteinfo
>> > > > > > without touching code under applications
>> > > > > >   <!-- send a system note to all Customer request participants
>> > > > (excluding
>> > > > > > the originator)
>> > > > > >          when a note is added to a particular customer
>> request.-->
>> > > > > >      <eca service="createCustRequestItemNote" event="commit">
>> > > > > >          <set field-name="noteParty" env-name="partyId"/>
>> > > > > >          <set field-name="noteInfo" value="A note has been
>> added to
>> > > > > customer
>> > > > > > request"/>
>> > > > > >          <set field-name="moreInfoItemName"
>> value="custRequestId"/>
>> > > > > >          <set field-name="moreInfoItemId"
>> > env-name="custRequestId"/>
>> > > > > >          <set field-name="moreInfoUrl"
>> > > > > > value="/ordermgr/control/ViewRequest"/>
>> > > > > >          <action service="createSystemInfoNote" mode="sync"/>
>> > > > > >      </eca>
>> > > > > > Is it possible to achieve this by overriding this in hot-deploy
>> > that
>> > > > has
>> > > > > > extended this component
>> > > > applications/order-extended/servicedef/secas.xml
>> > > > > > <!-- send a system note to all Customer request participants
>> > > (excluding
>> > > > > the
>> > > > > > originator)
>> > > > > >          when a note is added to a particular customer
>> request.-->
>> > > > > >      <eca service="createCustRequestItemNote" event="commit">
>> > > > > >          <set field-name="noteParty" env-name="partyId"/>
>> > > > > >          <set field-name="noteInfo" value="Custom Note"/>
>> > > > > >          <set field-name="moreInfoItemName"
>> value="custRequestId"/>
>> > > > > >          <set field-name="moreInfoItemId"
>> > env-name="custRequestId"/>
>> > > > > >          <set field-name="moreInfoUrl"
>> > > > > > value="/ordermgr/control/ViewRequest"/>
>> > > > > >          <action service="createSystemInfoNote" mode="sync"/>
>> > > > > >      </eca>
>> > > > > >
>> > > > > > I had tried this without success, however i'm using this
>> approach
>> > for
>> > > > > > overriding services.
>> > > > > >
>> > > > > > regards
>> > > > > > Sakthi
>> > > > >
>> > > > >
>> > > > > Hi Sakthi,
>> > > > >
>> > > > > Do you have a reference to secas file in your ofbiz-component.xml:
>> > > > >
>> > > > > <!-- For Service Event Control Action files, use the following -->
>> > > > > <service-resource type="eca" loader="main"
>> > > > > location="servicedef/secas.xml"/>
>> > > > >
>> > > > > In theory multiple SECAs can be called so both the original and
>> yours
>> > > > > will be called, I'm not sure how the priority would be decided,
>> but
>> > > > > hopefully core SECAs will fire first.
>> > > > >
>> > > > > Jason
>> > > > >
>> > > > >
>> > > >
>> > >
>> >
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: Override SECA Definition

Deepak Dixit-4
Hi Sakthi,

You need to override each and every seca rule that you want to disable.
The System performs an equal check on seca rule object, that includes the
condition and actions
So if you have 4 seca rule for an service with the same event name, but
condition is different, you need to override all rules.

Also please make sure your plugin loads after the scrums plugins.


Kind Regards,
Deepak Dixit
DIRECTOR OF PRODUCT ENGINEERING
mobile: +91 9826754548
email: [hidden email]
*www.hotwax.co <http://www.hotwax.co/>*


On Mon, Nov 2, 2020 at 3:48 AM Sakthivel Vellingiri <[hidden email]>
wrote:

> Deepak / Framework Gurus -
> Sorry to dig this from the grave, we are upgrading to 17.12 and wanted to
> leverage the *enabled="false" *attribute for disabling some OOTB eca rules,
> and have run into a question, there are 4 OOTB eca rules in scrum that i
> would like to disable, because they are configured for CustRequest >>
> Status that is interfering with our custom workflow that is planning to
> leverage CustRequest;
>
> Below are the OOTB rules on *service=setCustRequestStatus and
> event="commit"*; My understanding is that to disable all the rules with
> same service and event i just have to create ONE overriding  rule for
> *service="setCustRequestStatus"
> event="commit" *and do not have to override *each rule separately *pls can
> you provide some insights
>
>  <eca service="setCustRequestStatus" event="commit">
>         <condition field-name="oldStatusId" operator="equals"
> value="CRQ_REVIEWED"/>
>         <condition operator="equals" field-name="statusId"
> value="CRQ_ACCEPTED"/>
>         <set field-name="custRequestStatusId" value="CRQ_ACCEPTED"/>
>         <set field-name="webSiteId" env-name="webSiteId"/>
>         <action service="autoScrumNotification" mode="sync"/>
>     </eca>
>     <eca service="setCustRequestStatus" event="commit">
>         <condition operator="equals" field-name="statusId"
> value="CRQ_REVIEWED"/>
>         <set field-name="custRequestStatusId" value="CRQ_REVIEWED"/>
>         <set field-name="webSiteId" env-name="webSiteId"/>
>         <action service="autoScrumNotification" mode="sync"/>
>     </eca>
>     <eca service="setCustRequestStatus" event="commit">
>         <condition operator="equals" field-name="statusId"
> value="CRQ_COMPLETED"/>
>         <set field-name="custRequestStatusId" value="CRQ_COMPLETED"/>
>         <set field-name="webSiteId" env-name="webSiteId"/>
>         <action service="autoScrumNotification" mode="sync"/>
>     </eca>
>     <eca service="setCustRequestStatus" event="commit">
>         <condition operator="equals" field-name="statusId"
> value="CRQ_CANCELLED"/>
>         <set field-name="custRequestStatusId" value="CRQ_CANCELLED"/>
>         <set field-name="webSiteId" env-name="webSiteId"/>
>         <action service="autoScrumNotification" mode="sync"/>
>     </eca>
>
> regards
> Sakthi
>
>
> On Tue, Jun 2, 2020 at 9:25 AM Sakthivel Vellingiri <
> [hidden email]>
> wrote:
>
> > Great Deepak, thanks for the follow through, After your message i was
> able
> > to locate the Jira -> https://issues.apache.org/jira/browse/OFBIZ-9826
> and
> > this is exactly the feature that i was looking for, We are scheduled to
> > upgrade to 17.12 by the end of the year and we should be good by then,
> > Appreciate your time & effort
> >
> > regards
> > Sakthi
> >
> > On Tue, Jun 2, 2020 at 7:42 AM Deepak Dixit <[hidden email]> wrote:
> >
> >> Hi Sakthi,
> >>
> >> Yes, disable seca feature added in 17.12 release.
> >>
> >> Thanks & Regards
> >> --
> >> Deepak Dixit
> >> ofbiz.apache.org
> >>
> >>
> >> On Tue, Jun 2, 2020 at 8:50 AM Sakthivel Vellingiri <
> >> [hidden email]>
> >> wrote:
> >>
> >> > Thanks Deepak for your prompt response, that looked promising,
> however i
> >> > could not get that to work when i copied the SECA to my
> customComponent
> >> > (that extended order) and added enabled="false", but that did not
> >> suppress
> >> > the existing SECA, Just for verification i added enabled="false" in
> the
> >> > original order component itself but for whatever reason that did not
> >> work
> >> > either, BTW, i'm still on 12.04.03, yea it is long due for upgrade :(;
> >> it
> >> > is possible it is fixed in a later version, but for now i have
> created a
> >> > new SECA in my customComponent (that extended order) with a different
> >> event
> >> > i.e. event="return" instead of event="commit", that created an
> >> additional
> >> > event with the message that i need, however it did not suppress the
> >> > original event/message, but i guess will have to live with that or
> >> comment
> >> > out the original SECA in the original order component. But i really
> >> > appreciate your time to answer my question.
> >> >
> >> > Sakthi
> >> >
> >> >
> >> >
> >> >
> >> > On Mon, Jun 1, 2020 at 1:52 AM Deepak Dixit <[hidden email]>
> wrote:
> >> >
> >> > > Hi Sakthi,
> >> > >
> >> > > Which ofbiz version are you using?
> >> > >
> >> > > You can disable seca rule, copy seca rule in custom component and
> set
> >> > > enabled="false"
> >> > > it will disable the existing seca rule.
> >> > > Please refer the [1] service-eca.xsd for reference
> >> > >
> >> > > [1] http://ofbiz.apache.org/dtds/service-eca.xsd
> >> > > Thanks & Regards
> >> > > --
> >> > > Deepak Dixit
> >> > > ofbiz.apache.org
> >> > >
> >> > >
> >> > >
> >> > > On Fri, May 29, 2020 at 9:24 PM Sakthivel Vellingiri <
> >> > > [hidden email]> wrote:
> >> > >
> >> > > > Thanks Jason for immediate response, yes we do have below in our
> >> > extended
> >> > > > component; i understood, we could have multiple SECAs, however in
> >> this
> >> > > > particular case we only want our custom SECA to fire and not the
> >> > > original,
> >> > > > as we want to change the message that is passed in the original
> SECA
> >> > > > definition. hence wondering overriding the original SECA is
> possible
> >> > > which
> >> > > > will prevent original from running
> >> > > >     <service-resource type="eca" loader="main"
> >> > > > location="servicedef/secas.xml"/>
> >> > > >
> >> > > > Sakthi
> >> > > >
> >> > > > On Fri, May 29, 2020 at 10:58 AM Jason RJ <[hidden email]>
> >> > wrote:
> >> > > >
> >> > > > >
> >> > > > > On 29/05/2020 15:46, Sakthivel Vellingiri wrote:
> >> > > > > > Hi All -
> >> > > > > > *Summary:*
> >> > > > > > Appreciate any pointers, Is it possible to override SECA
> >> definition
> >> > > by
> >> > > > > > overriding the same definition in
> >> > > > > > hot-deploy/<extended-component>/servicedef/secas.xml
> >> > > > > >
> >> > > > > > *Details:*
> >> > > > > > There is a SECA definition in
> >> > > applications/order/servicedef/secas.xml,
> >> > > > as
> >> > > > > > you can see noteInfo is hardcoded, and i want to replace wih
> my
> >> > > > noteinfo
> >> > > > > > without touching code under applications
> >> > > > > >   <!-- send a system note to all Customer request participants
> >> > > > (excluding
> >> > > > > > the originator)
> >> > > > > >          when a note is added to a particular customer
> >> request.-->
> >> > > > > >      <eca service="createCustRequestItemNote" event="commit">
> >> > > > > >          <set field-name="noteParty" env-name="partyId"/>
> >> > > > > >          <set field-name="noteInfo" value="A note has been
> >> added to
> >> > > > > customer
> >> > > > > > request"/>
> >> > > > > >          <set field-name="moreInfoItemName"
> >> value="custRequestId"/>
> >> > > > > >          <set field-name="moreInfoItemId"
> >> > env-name="custRequestId"/>
> >> > > > > >          <set field-name="moreInfoUrl"
> >> > > > > > value="/ordermgr/control/ViewRequest"/>
> >> > > > > >          <action service="createSystemInfoNote" mode="sync"/>
> >> > > > > >      </eca>
> >> > > > > > Is it possible to achieve this by overriding this in
> hot-deploy
> >> > that
> >> > > > has
> >> > > > > > extended this component
> >> > > > applications/order-extended/servicedef/secas.xml
> >> > > > > > <!-- send a system note to all Customer request participants
> >> > > (excluding
> >> > > > > the
> >> > > > > > originator)
> >> > > > > >          when a note is added to a particular customer
> >> request.-->
> >> > > > > >      <eca service="createCustRequestItemNote" event="commit">
> >> > > > > >          <set field-name="noteParty" env-name="partyId"/>
> >> > > > > >          <set field-name="noteInfo" value="Custom Note"/>
> >> > > > > >          <set field-name="moreInfoItemName"
> >> value="custRequestId"/>
> >> > > > > >          <set field-name="moreInfoItemId"
> >> > env-name="custRequestId"/>
> >> > > > > >          <set field-name="moreInfoUrl"
> >> > > > > > value="/ordermgr/control/ViewRequest"/>
> >> > > > > >          <action service="createSystemInfoNote" mode="sync"/>
> >> > > > > >      </eca>
> >> > > > > >
> >> > > > > > I had tried this without success, however i'm using this
> >> approach
> >> > for
> >> > > > > > overriding services.
> >> > > > > >
> >> > > > > > regards
> >> > > > > > Sakthi
> >> > > > >
> >> > > > >
> >> > > > > Hi Sakthi,
> >> > > > >
> >> > > > > Do you have a reference to secas file in your
> ofbiz-component.xml:
> >> > > > >
> >> > > > > <!-- For Service Event Control Action files, use the following
> -->
> >> > > > > <service-resource type="eca" loader="main"
> >> > > > > location="servicedef/secas.xml"/>
> >> > > > >
> >> > > > > In theory multiple SECAs can be called so both the original and
> >> yours
> >> > > > > will be called, I'm not sure how the priority would be decided,
> >> but
> >> > > > > hopefully core SECAs will fire first.
> >> > > > >
> >> > > > > Jason
> >> > > > >
> >> > > > >
> >> > > >
> >> > >
> >> >
> >>
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Override SECA Definition

Sakthivel Vellingiri
Thanks Deepak for the prompt response and noted, and also providing
insights on the object equal check being done, will make the change
accordingly.

regards

On Mon, Nov 2, 2020 at 12:22 AM Deepak Dixit <[hidden email]> wrote:

> Hi Sakthi,
>
> You need to override each and every seca rule that you want to disable.
> The System performs an equal check on seca rule object, that includes the
> condition and actions
> So if you have 4 seca rule for an service with the same event name, but
> condition is different, you need to override all rules.
>
> Also please make sure your plugin loads after the scrums plugins.
>
>
> Kind Regards,
> Deepak Dixit
> DIRECTOR OF PRODUCT ENGINEERING
> mobile: +91 9826754548
> email: [hidden email]
> *www.hotwax.co <http://www.hotwax.co/>*
>
>
> On Mon, Nov 2, 2020 at 3:48 AM Sakthivel Vellingiri <
> [hidden email]>
> wrote:
>
> > Deepak / Framework Gurus -
> > Sorry to dig this from the grave, we are upgrading to 17.12 and wanted to
> > leverage the *enabled="false" *attribute for disabling some OOTB eca
> rules,
> > and have run into a question, there are 4 OOTB eca rules in scrum that i
> > would like to disable, because they are configured for CustRequest >>
> > Status that is interfering with our custom workflow that is planning to
> > leverage CustRequest;
> >
> > Below are the OOTB rules on *service=setCustRequestStatus and
> > event="commit"*; My understanding is that to disable all the rules with
> > same service and event i just have to create ONE overriding  rule for
> > *service="setCustRequestStatus"
> > event="commit" *and do not have to override *each rule separately *pls
> can
> > you provide some insights
> >
> >  <eca service="setCustRequestStatus" event="commit">
> >         <condition field-name="oldStatusId" operator="equals"
> > value="CRQ_REVIEWED"/>
> >         <condition operator="equals" field-name="statusId"
> > value="CRQ_ACCEPTED"/>
> >         <set field-name="custRequestStatusId" value="CRQ_ACCEPTED"/>
> >         <set field-name="webSiteId" env-name="webSiteId"/>
> >         <action service="autoScrumNotification" mode="sync"/>
> >     </eca>
> >     <eca service="setCustRequestStatus" event="commit">
> >         <condition operator="equals" field-name="statusId"
> > value="CRQ_REVIEWED"/>
> >         <set field-name="custRequestStatusId" value="CRQ_REVIEWED"/>
> >         <set field-name="webSiteId" env-name="webSiteId"/>
> >         <action service="autoScrumNotification" mode="sync"/>
> >     </eca>
> >     <eca service="setCustRequestStatus" event="commit">
> >         <condition operator="equals" field-name="statusId"
> > value="CRQ_COMPLETED"/>
> >         <set field-name="custRequestStatusId" value="CRQ_COMPLETED"/>
> >         <set field-name="webSiteId" env-name="webSiteId"/>
> >         <action service="autoScrumNotification" mode="sync"/>
> >     </eca>
> >     <eca service="setCustRequestStatus" event="commit">
> >         <condition operator="equals" field-name="statusId"
> > value="CRQ_CANCELLED"/>
> >         <set field-name="custRequestStatusId" value="CRQ_CANCELLED"/>
> >         <set field-name="webSiteId" env-name="webSiteId"/>
> >         <action service="autoScrumNotification" mode="sync"/>
> >     </eca>
> >
> > regards
> > Sakthi
> >
> >
> > On Tue, Jun 2, 2020 at 9:25 AM Sakthivel Vellingiri <
> > [hidden email]>
> > wrote:
> >
> > > Great Deepak, thanks for the follow through, After your message i was
> > able
> > > to locate the Jira -> https://issues.apache.org/jira/browse/OFBIZ-9826
> > and
> > > this is exactly the feature that i was looking for, We are scheduled to
> > > upgrade to 17.12 by the end of the year and we should be good by then,
> > > Appreciate your time & effort
> > >
> > > regards
> > > Sakthi
> > >
> > > On Tue, Jun 2, 2020 at 7:42 AM Deepak Dixit <[hidden email]> wrote:
> > >
> > >> Hi Sakthi,
> > >>
> > >> Yes, disable seca feature added in 17.12 release.
> > >>
> > >> Thanks & Regards
> > >> --
> > >> Deepak Dixit
> > >> ofbiz.apache.org
> > >>
> > >>
> > >> On Tue, Jun 2, 2020 at 8:50 AM Sakthivel Vellingiri <
> > >> [hidden email]>
> > >> wrote:
> > >>
> > >> > Thanks Deepak for your prompt response, that looked promising,
> > however i
> > >> > could not get that to work when i copied the SECA to my
> > customComponent
> > >> > (that extended order) and added enabled="false", but that did not
> > >> suppress
> > >> > the existing SECA, Just for verification i added enabled="false" in
> > the
> > >> > original order component itself but for whatever reason that did not
> > >> work
> > >> > either, BTW, i'm still on 12.04.03, yea it is long due for upgrade
> :(;
> > >> it
> > >> > is possible it is fixed in a later version, but for now i have
> > created a
> > >> > new SECA in my customComponent (that extended order) with a
> different
> > >> event
> > >> > i.e. event="return" instead of event="commit", that created an
> > >> additional
> > >> > event with the message that i need, however it did not suppress the
> > >> > original event/message, but i guess will have to live with that or
> > >> comment
> > >> > out the original SECA in the original order component. But i really
> > >> > appreciate your time to answer my question.
> > >> >
> > >> > Sakthi
> > >> >
> > >> >
> > >> >
> > >> >
> > >> > On Mon, Jun 1, 2020 at 1:52 AM Deepak Dixit <[hidden email]>
> > wrote:
> > >> >
> > >> > > Hi Sakthi,
> > >> > >
> > >> > > Which ofbiz version are you using?
> > >> > >
> > >> > > You can disable seca rule, copy seca rule in custom component and
> > set
> > >> > > enabled="false"
> > >> > > it will disable the existing seca rule.
> > >> > > Please refer the [1] service-eca.xsd for reference
> > >> > >
> > >> > > [1] http://ofbiz.apache.org/dtds/service-eca.xsd
> > >> > > Thanks & Regards
> > >> > > --
> > >> > > Deepak Dixit
> > >> > > ofbiz.apache.org
> > >> > >
> > >> > >
> > >> > >
> > >> > > On Fri, May 29, 2020 at 9:24 PM Sakthivel Vellingiri <
> > >> > > [hidden email]> wrote:
> > >> > >
> > >> > > > Thanks Jason for immediate response, yes we do have below in our
> > >> > extended
> > >> > > > component; i understood, we could have multiple SECAs, however
> in
> > >> this
> > >> > > > particular case we only want our custom SECA to fire and not the
> > >> > > original,
> > >> > > > as we want to change the message that is passed in the original
> > SECA
> > >> > > > definition. hence wondering overriding the original SECA is
> > possible
> > >> > > which
> > >> > > > will prevent original from running
> > >> > > >     <service-resource type="eca" loader="main"
> > >> > > > location="servicedef/secas.xml"/>
> > >> > > >
> > >> > > > Sakthi
> > >> > > >
> > >> > > > On Fri, May 29, 2020 at 10:58 AM Jason RJ <
> [hidden email]>
> > >> > wrote:
> > >> > > >
> > >> > > > >
> > >> > > > > On 29/05/2020 15:46, Sakthivel Vellingiri wrote:
> > >> > > > > > Hi All -
> > >> > > > > > *Summary:*
> > >> > > > > > Appreciate any pointers, Is it possible to override SECA
> > >> definition
> > >> > > by
> > >> > > > > > overriding the same definition in
> > >> > > > > > hot-deploy/<extended-component>/servicedef/secas.xml
> > >> > > > > >
> > >> > > > > > *Details:*
> > >> > > > > > There is a SECA definition in
> > >> > > applications/order/servicedef/secas.xml,
> > >> > > > as
> > >> > > > > > you can see noteInfo is hardcoded, and i want to replace wih
> > my
> > >> > > > noteinfo
> > >> > > > > > without touching code under applications
> > >> > > > > >   <!-- send a system note to all Customer request
> participants
> > >> > > > (excluding
> > >> > > > > > the originator)
> > >> > > > > >          when a note is added to a particular customer
> > >> request.-->
> > >> > > > > >      <eca service="createCustRequestItemNote"
> event="commit">
> > >> > > > > >          <set field-name="noteParty" env-name="partyId"/>
> > >> > > > > >          <set field-name="noteInfo" value="A note has been
> > >> added to
> > >> > > > > customer
> > >> > > > > > request"/>
> > >> > > > > >          <set field-name="moreInfoItemName"
> > >> value="custRequestId"/>
> > >> > > > > >          <set field-name="moreInfoItemId"
> > >> > env-name="custRequestId"/>
> > >> > > > > >          <set field-name="moreInfoUrl"
> > >> > > > > > value="/ordermgr/control/ViewRequest"/>
> > >> > > > > >          <action service="createSystemInfoNote"
> mode="sync"/>
> > >> > > > > >      </eca>
> > >> > > > > > Is it possible to achieve this by overriding this in
> > hot-deploy
> > >> > that
> > >> > > > has
> > >> > > > > > extended this component
> > >> > > > applications/order-extended/servicedef/secas.xml
> > >> > > > > > <!-- send a system note to all Customer request participants
> > >> > > (excluding
> > >> > > > > the
> > >> > > > > > originator)
> > >> > > > > >          when a note is added to a particular customer
> > >> request.-->
> > >> > > > > >      <eca service="createCustRequestItemNote"
> event="commit">
> > >> > > > > >          <set field-name="noteParty" env-name="partyId"/>
> > >> > > > > >          <set field-name="noteInfo" value="Custom Note"/>
> > >> > > > > >          <set field-name="moreInfoItemName"
> > >> value="custRequestId"/>
> > >> > > > > >          <set field-name="moreInfoItemId"
> > >> > env-name="custRequestId"/>
> > >> > > > > >          <set field-name="moreInfoUrl"
> > >> > > > > > value="/ordermgr/control/ViewRequest"/>
> > >> > > > > >          <action service="createSystemInfoNote"
> mode="sync"/>
> > >> > > > > >      </eca>
> > >> > > > > >
> > >> > > > > > I had tried this without success, however i'm using this
> > >> approach
> > >> > for
> > >> > > > > > overriding services.
> > >> > > > > >
> > >> > > > > > regards
> > >> > > > > > Sakthi
> > >> > > > >
> > >> > > > >
> > >> > > > > Hi Sakthi,
> > >> > > > >
> > >> > > > > Do you have a reference to secas file in your
> > ofbiz-component.xml:
> > >> > > > >
> > >> > > > > <!-- For Service Event Control Action files, use the following
> > -->
> > >> > > > > <service-resource type="eca" loader="main"
> > >> > > > > location="servicedef/secas.xml"/>
> > >> > > > >
> > >> > > > > In theory multiple SECAs can be called so both the original
> and
> > >> yours
> > >> > > > > will be called, I'm not sure how the priority would be
> decided,
> > >> but
> > >> > > > > hopefully core SECAs will fire first.
> > >> > > > >
> > >> > > > > Jason
> > >> > > > >
> > >> > > > >
> > >> > > >
> > >> > >
> > >> >
> > >>
> > >
> >
>