Is it possible to extend an eca? For example, when an order is
completed, I would like to call another service. There is already an OOTB eca: <eca service="changeOrderItemStatus" event="commit"> <condition field-name="statusId" operator="equals" value="ITEM_COMPLETED"/> <action service="checkOrderItemStatus" mode="sync"/> </eca> I can't see a way to extend this, should I just place a duplicate eca definition in mycomponent, e.g. <eca service="changeOrderItemStatus" event="commit"> <condition field-name="statusId" operator="equals" value="ITEM_COMPLETED"/> <action service="checkOrderItemStatus" mode="sync"/> <action service="myCustomerService" mode="sync"/> </eca> Will this duplicate definition override the OOTB one? Many thanks, Chris |
don't believe so
just remove the <action service="checkOrderItemStatus" mode="sync"/> from yours both will fire. Note: unless I want to change based on commit I use one of the other triggers that fit my service. they all effect the same transaction. chris snow sent the following on 9/17/2010 11:01 AM: > Is it possible to extend an eca? For example, when an order is > completed, I would like to call another service. There is already an > OOTB eca: > > <eca service="changeOrderItemStatus" event="commit"> > <condition field-name="statusId" operator="equals" > value="ITEM_COMPLETED"/> > <action service="checkOrderItemStatus" mode="sync"/> > </eca> > > I can't see a way to extend this, should I just place a duplicate eca > definition in mycomponent, e.g. > > <eca service="changeOrderItemStatus" event="commit"> > <condition field-name="statusId" operator="equals" > value="ITEM_COMPLETED"/> > <action service="checkOrderItemStatus" mode="sync"/> > <action service="myCustomerService" mode="sync"/> > </eca> > > Will this duplicate definition override the OOTB one? > > Many thanks, > > Chris > |
oops meant event instead of trigger
BJ Freeman sent the following on 9/17/2010 12:40 PM: > don't believe so > just remove the > <action service="checkOrderItemStatus" mode="sync"/> > from yours > both will fire. > Note: unless I want to change based on commit I use one of the other > triggers that fit my service. they all effect the same transaction. > > > chris snow sent the following on 9/17/2010 11:01 AM: >> Is it possible to extend an eca? For example, when an order is >> completed, I would like to call another service. There is already an >> OOTB eca: >> >> <eca service="changeOrderItemStatus" event="commit"> >> <condition field-name="statusId" operator="equals" >> value="ITEM_COMPLETED"/> >> <action service="checkOrderItemStatus" mode="sync"/> >> </eca> >> >> I can't see a way to extend this, should I just place a duplicate eca >> definition in mycomponent, e.g. >> >> <eca service="changeOrderItemStatus" event="commit"> >> <condition field-name="statusId" operator="equals" >> value="ITEM_COMPLETED"/> >> <action service="checkOrderItemStatus" mode="sync"/> >> <action service="myCustomerService" mode="sync"/> >> </eca> >> >> Will this duplicate definition override the OOTB one? >> >> Many thanks, >> >> Chris >> > > |
In reply to this post by BJ Freeman
> Note: unless I want to change based on commit I use one of the other
> triggers that fit my service. they all effect the same transaction. Hi BJ, I don't understand your last line - can you please elaborate? I would like checkOrderItemStatus and myCustomerService to be part of the same transaction - i.e. both are successful or get rolled back. |
sorry about that was thinking same service and wrote same transaction. as far as I know you do not replace the other eca so it will be processed then yours will be. chris snow sent the following on 9/17/2010 12:51 PM: >> Note: unless I want to change based on commit I use one of the other >> triggers that fit my service. they all effect the same transaction. > > Hi BJ, I don't understand your last line - can you please elaborate? > > I would like checkOrderItemStatus and myCustomerService to be part of > the same transaction - i.e. both are successful or get rolled back. > |
Free forum by Nabble | Edit this page |