svn commit: r629220 - in /ofbiz/trunk/applications: order/script/org/ofbiz/order/quote/QuoteServices.xml order/servicedef/secas.xml order/servicedef/services_quote.xml product/data/ProductTypeData.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r629220 - in /ofbiz/trunk/applications: order/script/org/ofbiz/order/quote/QuoteServices.xml order/servicedef/secas.xml order/servicedef/services_quote.xml product/data/ProductTypeData.xml

mrisaliti
Author: mrisaliti
Date: Tue Feb 19 12:40:57 2008
New Revision: 629220

URL: http://svn.apache.org/viewvc?rev=629220&view=rev
Log:
Create a new product store email notification execute on quoteStore event for quote creation status (Part of issue OFBIZ-1658).

Modified:
    ofbiz/trunk/applications/order/script/org/ofbiz/order/quote/QuoteServices.xml
    ofbiz/trunk/applications/order/servicedef/secas.xml
    ofbiz/trunk/applications/order/servicedef/services_quote.xml
    ofbiz/trunk/applications/product/data/ProductTypeData.xml

Modified: ofbiz/trunk/applications/order/script/org/ofbiz/order/quote/QuoteServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/script/org/ofbiz/order/quote/QuoteServices.xml?rev=629220&r1=629219&r2=629220&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/script/org/ofbiz/order/quote/QuoteServices.xml (original)
+++ ofbiz/trunk/applications/order/script/org/ofbiz/order/quote/QuoteServices.xml Tue Feb 19 12:40:57 2008
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8" ?>
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
 Licensed to the Apache Software Foundation (ASF) under one
 or more contributor license agreements.  See the NOTICE file
@@ -862,4 +862,19 @@
             <remove-value value-name="quoteWorkEffort"/>
         </if-not-empty>
     </simple-method>
-</simple-methods>
+    <simple-method method-name="sendQuoteEmailForCreation" login-required="false" short-description="Send an e-mail for quote creation">
+        <clear-field field-name="quoteAttributeIn"/>
+        <set field="quoteAttributeIn.quoteId" from-field="parameters.quoteId"/>
+        <set field="quoteAttributeIn.attrName" value="EMAIL"/>
+        <find-by-and map-name="quoteAttributeIn" list-name="quoteAttributes" entity-name="QuoteAttribute"/>
+        <first-from-list entry-name="quoteAttribute" list-name="quoteAttributes"/>
+        
+        <if-not-empty field-name="quoteAttribute">
+            <clear-field field-name="sendQuoteInMap"/>
+            <set field="sendQuoteInMap.emailType" value="PRDS_QUO_CREATED"/>
+            <set field="sendQuoteInMap.quoteId" from-field="parameters.quoteId"/>
+            <set field="sendQuoteInMap.sendTo" from-field="quoteAttribute.attrValue"/>
+            <call-service service-name="sendQuoteReportMail" in-map-name="sendQuoteInMap"/>
+        </if-not-empty>
+    </simple-method>
+</simple-methods>
\ No newline at end of file

Modified: ofbiz/trunk/applications/order/servicedef/secas.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/servicedef/secas.xml?rev=629220&r1=629219&r2=629220&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/servicedef/secas.xml (original)
+++ ofbiz/trunk/applications/order/servicedef/secas.xml Tue Feb 19 12:40:57 2008
@@ -298,4 +298,9 @@
         <condition field-name="workEffortId" operator="is-empty" />
         <action service="createWorkEffort" mode="sync"/>
     </eca>
-</service-eca>
+    
+    <!-- Quote -->
+    <eca service="storeQuote" event="commit">
+        <action service="sendQuoteEmailForCreation" mode="async" persist="true"/>
+    </eca>
+</service-eca>
\ No newline at end of file

Modified: ofbiz/trunk/applications/order/servicedef/services_quote.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/servicedef/services_quote.xml?rev=629220&r1=629219&r2=629220&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/servicedef/services_quote.xml (original)
+++ ofbiz/trunk/applications/order/servicedef/services_quote.xml Tue Feb 19 12:40:57 2008
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8" ?>
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
 Licensed to the Apache Software Foundation (ASF) under one
 or more contributor license agreements.  See the NOTICE file
@@ -232,4 +232,9 @@
         <attribute name="quoteAttributes" type="List" mode="IN" optional="true"/>
         <attribute name="quoteId" type="String" mode="OUT" optional="false"/>
     </service>
-</services>
+    <service name="sendQuoteEmailForCreation" engine="simple" require-new-transaction="true"
+             location="org/ofbiz/order/quote/QuoteServices.xml" invoke="sendQuoteEmailForCreation">
+        <description>Send an e-mail for quote creation</description>  
+        <attribute name="quoteId" type="String" mode="IN" optional="false"/>
+    </service>
+</services>
\ No newline at end of file

Modified: ofbiz/trunk/applications/product/data/ProductTypeData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/data/ProductTypeData.xml?rev=629220&r1=629219&r2=629220&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/data/ProductTypeData.xml (original)
+++ ofbiz/trunk/applications/product/data/ProductTypeData.xml Tue Feb 19 12:40:57 2008
@@ -104,8 +104,9 @@
     <Enumeration description="Tell-A-Friend" enumCode="TELL_FRIEND" enumId="PRDS_TELL_FRIEND" enumTypeId="PRDS_EMAIL" sequenceId="11"/>
     <Enumeration description="Gift-Card Purchase" enumCode="GC_PURCHASE" enumId="PRDS_GC_PURCHASE" enumTypeId="PRDS_EMAIL" sequenceId="12"/>
     <Enumeration description="Gift-Card Reload" enumCode="GC_RELOAD" enumId="PRDS_GC_RELOAD" enumTypeId="PRDS_EMAIL" sequenceId="13"/>
-    <Enumeration description="Quote Confirmation" enumCode="QUO_CONFIRM" enumId="PRDS_QUO_CONFIRM" enumTypeId="PRDS_EMAIL" sequenceId="14"/>
-    <Enumeration description="Shipment Complete" enumCode="SHP_COMPLETE" enumId="PRDS_ODR_SHIP_COMPLT" enumTypeId="PRDS_EMAIL" sequenceId="15"/>
+    <Enumeration description="Quote Created" enumCode="QUO_CREATED" enumId="PRDS_QUO_CREATED" enumTypeId="PRDS_EMAIL" sequenceId="14"/>
+    <Enumeration description="Quote Confirmation" enumCode="QUO_CONFIRM" enumId="PRDS_QUO_CONFIRM" enumTypeId="PRDS_EMAIL" sequenceId="15"/>
+    <Enumeration description="Shipment Complete" enumCode="SHP_COMPLETE" enumId="PRDS_ODR_SHIP_COMPLT" enumTypeId="PRDS_EMAIL" sequenceId="16"/>
 
     <EnumerationType description="Facility Location Type" enumTypeId="FACLOC_TYPE" hasTable="N" parentTypeId=""/>
     <Enumeration description="Pick/Primary" enumCode="PICKLOC" enumId="FLT_PICKLOC" enumTypeId="FACLOC_TYPE" sequenceId="01"/>