Hi Jacopo, That was a typing mistake by me in the
mail, wasn’t the case with the actual code. Please consider the following: 1. My product import file is as follows: a. <?xml version="1.0" encoding="UTF-8"?> <entity-engine-xml> <Product
productId="SGTEST-1000" productTypeId="FINISHED_GOOD"
primaryProductCategoryId="9001" salesDiscontinuationDate="2005-08-24
10:40:17.552" internalName="SG TEST PRODUCT"
productName="Modem" description="ADSL Modem"
smallImageUrl="/images/btcom/bt_wireless_hub.jpg"
largeImageUrl="/images/btcom/bt_wireless_hub.jpg"
taxable="N" chargeShipping="N" autoCreateKeywords="Y"
isVirtual="N" isVariant="N" createdDate="2003-03-04
19:00:29.851" createdByUserLogin="admin"
lastModifiedDate="2003-03-04 19:02:17.445"
lastModifiedByUserLogin="admin" lastUpdatedStamp="2005-08-17
15:12:58.59" lastUpdatedTxStamp="2005-08-17 15:12:56.988"
createdStamp="2005-08-10 18:28:55.822"
createdTxStamp="2005-08-10 18:28:43.144"
status="DELETED"/> </entity-engine-xml> 2. My entry in eecas.xml is: a. <eca entity="Product"
operation="create-store" event="return">
<condition field-name="productId"
operator="is-not-empty"/>
<condition field-name="salesDiscontinuationDate"
operator="is-not-empty"/>
<condition field-name="status"
operator="is-not-empty"/>
<action service="setProductStatusAsDeleted" mode="sync"
value-attr="productInstance"/>
</eca> It doesn’t seem to trigger the
event & it moves on to the next available event. Any clues? Ultimately what I want to check is that
if salesDiscontinuationDate is not empty & status is DELETED, then this eca
should be triggered. Thanks and regards, Sachin Gulvady
_______________________________________________ Users mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/users |
Also, within a <condition> tag, how
can I check for a particular field against a dynamic value? E.g.
salesDiscontinuationDate <= today’s date? Regards, Sachin. From: saching
[mailto:[hidden email]] Hi Jacopo, That was a typing mistake by me in the
mail, wasn’t the case with the actual code. Please consider the following: 1. My product import file is as follows: a. <?xml version="1.0" encoding="UTF-8"?> <entity-engine-xml>
<Product productId="SGTEST-1000"
productTypeId="FINISHED_GOOD"
primaryProductCategoryId="9001"
salesDiscontinuationDate="2005-08-24 10:40:17.552"
internalName="SG TEST PRODUCT" productName="Modem"
description="ADSL Modem"
smallImageUrl="/images/btcom/bt_wireless_hub.jpg" largeImageUrl="/images/btcom/bt_wireless_hub.jpg"
taxable="N" chargeShipping="N"
autoCreateKeywords="Y" isVirtual="N"
isVariant="N" createdDate="2003-03-04 19:00:29.851"
createdByUserLogin="admin" lastModifiedDate="2003-03-04
19:02:17.445" lastModifiedByUserLogin="admin"
lastUpdatedStamp="2005-08-17 15:12:58.59"
lastUpdatedTxStamp="2005-08-17 15:12:56.988"
createdStamp="2005-08-10 18:28:55.822"
createdTxStamp="2005-08-10 18:28:43.144" status="DELETED"/> </entity-engine-xml> 2. My entry in eecas.xml is: a. <eca entity="Product"
operation="create-store" event="return">
<condition field-name="productId"
operator="is-not-empty"/>
<condition field-name="salesDiscontinuationDate"
operator="is-not-empty"/>
<condition field-name="status" operator="is-not-empty"/>
<action service="setProductStatusAsDeleted" mode="sync"
value-attr="productInstance"/>
</eca> It doesn’t seem to trigger the
event & it moves on to the next available event. Any clues? Ultimately what I want to check is that
if salesDiscontinuationDate is not empty & status is DELETED, then this eca
should be triggered. Thanks and regards, Sachin Gulvady
_______________________________________________ Users mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/users |
In reply to this post by saching
I see,
open the console log file (under the logs folder) you should find very useful messages that tell you when an eca is evaluated and triggered or not triggered based on the conditions. This will help you to find where the problem is. Jacopo saching wrote: > Hi Jacopo, > > > > That was a typing mistake by me in the mail, wasn’t the case with the > actual code. > > > > Please consider the following: > > 1. My product import file is as follows: > > a. <?xml version="1.0" encoding="UTF-8"?> > > <entity-engine-xml> > > <Product productId="SGTEST-1000" productTypeId="FINISHED_GOOD" > primaryProductCategoryId="9001" salesDiscontinuationDate="2005-08-24 > 10:40:17.552" internalName="SG TEST PRODUCT" productName="Modem" > description="ADSL Modem" > smallImageUrl="/images/btcom/bt_wireless_hub.jpg" > largeImageUrl="/images/btcom/bt_wireless_hub.jpg" taxable="N" > chargeShipping="N" autoCreateKeywords="Y" isVirtual="N" isVariant="N" > createdDate="2003-03-04 19:00:29.851" createdByUserLogin="admin" > lastModifiedDate="2003-03-04 19:02:17.445" > lastModifiedByUserLogin="admin" lastUpdatedStamp="2005-08-17 > 15:12:58.59" lastUpdatedTxStamp="2005-08-17 15:12:56.988" > createdStamp="2005-08-10 18:28:55.822" createdTxStamp="2005-08-10 > 18:28:43.144" status="DELETED"/> > > </entity-engine-xml> > > > > 2. My entry in eecas.xml is: > > a. <eca entity="Product" operation="create-store" event="return"> > > <condition field-name="productId" operator="is-not-empty"/> > > <condition field-name="salesDiscontinuationDate" > operator="is-not-empty"/> > > <condition field-name="status" operator="is-not-empty"/> > > <action service="setProductStatusAsDeleted" mode="sync" > value-attr="productInstance"/> > > </eca> > > It doesn’t seem to trigger the event & it moves on to the next available > event. > > > > Any clues? > > > > Ultimately what I want to check is that if salesDiscontinuationDate is > not empty & status is DELETED, then this eca should be triggered. > > > > Thanks and regards, > > *Sachin Gulvady* > > ********************************************************* > Disclaimer: > > The contents of this E-mail (including the contents of the enclosure(s) > or attachment(s) if any) are privileged and confidential material of MBT > and should not be disclosed to, used by or copied in any manner by > anyone other than the intended addressee(s). In case you are not the > desired addressee, you should delete this message and/or re-direct it to > the sender. The views expressed in this E-mail message (including the > enclosure(s) or attachment(s) if any) are those of the individual > sender, except where the sender expressly, and with authority, states > them to be the views of MBT. > > This e-mail message including attachment/(s), if any, is believed to be > free of any virus. However, it is the responsibility of the recipient to > ensure that it is virus free and MBT is not responsible for any loss or > damage arising in any way from its use > > ********************************************************* > > > ------------------------------------------------------------------------ > > > _______________________________________________ > Users mailing list > [hidden email] > http://lists.ofbiz.org/mailman/listinfo/users _______________________________________________ Users mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/users |
Free forum by Nabble | Edit this page |