Hi Jeremy, You can't really override an ECA definition but you could override the service "createAcctgTransForShipmentReceipt" and place the additional condition in a new implementation. So basically you would: 1. Define a new service called createAcctgTransForShipmentReceipt that points to a new custom implementation 2. Define a service that points to the existing implementation, maybe ofbizCreateAcctgTransForShipmentReceipt 3. Include your condition in the new implementation for #1, if it passes then call #2
Regards Scott HotWax Media http://www.hotwaxmedia.com On 4/11/2010, at 5:21 AM, Jeremy Olmstead wrote: > I want to modify an existing ECA by adding a condition that currently > doesn't exist, without modifying the base code. Is this possible? What I > attempted didn't work. First I modified the ofbiz-component.xml file in my > hot-deploy extension of the existing app to include the service-resource > location. Then I created the definition exactly as it was in the original > xml file with the addition of a new condition. It's still firing the action > even when my new condition is not true. See below for relevant code. > > Original ECA definition > <eca service="createShipmentReceipt" event="commit"> > <action service="createAcctgTransForShipmentReceipt" mode="sync"/> > </eca> > > Custom ECA definition in hot-deploy > <eca service="createShipmentReceipt" event="commit"> > <condition field-name="orderItemTypeId" operator="not-equals" > value="SUPPLIES_ORDER_ITEM"/> > <action service="createAcctgTransForShipmentReceipt" mode="sync"/> > </eca> > > Regards, > Jeremy
smime.p7s
Description: S/MIME cryptographic signature
