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