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 < [email protected]> 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 <[email protected]> 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 > > > > >
