Author: sichen
Date: Wed Jan 10 16:44:55 2007
New Revision: 495066
URL:
http://svn.apache.org/viewvc?view=rev&rev=495066Log:
One more change to contact list emails: the status remains in PENDING until the async send email service complets
Modified:
ofbiz/trunk/applications/party/servicedef/secas.xml
ofbiz/trunk/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java
Modified: ofbiz/trunk/applications/party/servicedef/secas.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/servicedef/secas.xml?view=diff&rev=495066&r1=495065&r2=495066==============================================================================
--- ofbiz/trunk/applications/party/servicedef/secas.xml (original)
+++ ofbiz/trunk/applications/party/servicedef/secas.xml Wed Jan 10 16:44:55 2007
@@ -72,9 +72,8 @@
<action service="sendCommEventAsEmail" mode="sync"/>
</eca>
- <!-- when we're done sending a communication event as an email, mark it as complete. This is helpful when
- a comm event email is sent to a contact list. After all the emails have been sent, mark it as complete. -->
- <eca service="sendCommEventAsEmail" event="commit">
+ <!-- After all the emails have been sent to a contact list, mark it as complete. -->
+ <eca service="sendEmailToContactList" event="commit">
<action service="setCommEventComplete" mode="sync"/>
</eca>
Modified: ofbiz/trunk/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java?view=diff&rev=495066&r1=495065&r2=495066==============================================================================
--- ofbiz/trunk/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java (original)
+++ ofbiz/trunk/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java Wed Jan 10 16:44:55 2007
@@ -97,7 +97,12 @@
Map tmpResult = dispatcher.runSync("sendMail", sendMailParams);
if (ServiceUtil.isError(tmpResult)) {
errorMessages.add(ServiceUtil.getErrorMessage(tmpResult));
- }
+ } else {
+ Map completeResult = dispatcher.runSync("setCommEventComplete", UtilMisc.toMap("communicationEventId", communicationEventId, "userLogin", userLogin));
+ if (ServiceUtil.isError(completeResult)) {
+ errorMessages.add(ServiceUtil.getErrorMessage(completeResult));
+ }
+ }
} else {
// Call the sendEmailToContactList service if there's a contactListId present