[Erp5-report] r24612 - in /erp5/trunk/bt5/erp5_egov: WorkflowTemplateItem/portal_workflow/e...
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Nov 17 17:56:58 CET 2008
Author: fabien
Date: Mon Nov 17 17:56:57 2008
New Revision: 24612
URL: http://svn.erp5.org?rev=24612&view=rev
Log:
2008-11-17 fabien
* add workflow scripts to send notification by email
Added:
erp5/trunk/bt5/erp5_egov/WorkflowTemplateItem/portal_workflow/egov_interaction_workflow/scripts/SubscriptionForm_setEmail.xml
erp5/trunk/bt5/erp5_egov/WorkflowTemplateItem/portal_workflow/egov_interaction_workflow/scripts/sendNotificationByMail.xml
Modified:
erp5/trunk/bt5/erp5_egov/WorkflowTemplateItem/portal_workflow/egov_interaction_workflow/interactions/SubscriptionForm_AccountInexistance.xml
erp5/trunk/bt5/erp5_egov/bt/change_log
erp5/trunk/bt5/erp5_egov/bt/revision
Modified: erp5/trunk/bt5/erp5_egov/WorkflowTemplateItem/portal_workflow/egov_interaction_workflow/interactions/SubscriptionForm_AccountInexistance.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_egov/WorkflowTemplateItem/portal_workflow/egov_interaction_workflow/interactions/SubscriptionForm_AccountInexistance.xml?rev=24612&r1=24611&r2=24612&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_egov/WorkflowTemplateItem/portal_workflow/egov_interaction_workflow/interactions/SubscriptionForm_AccountInexistance.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_egov/WorkflowTemplateItem/portal_workflow/egov_interaction_workflow/interactions/SubscriptionForm_AccountInexistance.xml [utf8] Mon Nov 17 17:56:57 2008
@@ -30,7 +30,9 @@
<item>
<key> <string>after_script_name</string> </key>
<value>
- <tuple/>
+ <list>
+ <string>sendNotificationByMail</string>
+ </list>
</value>
</item>
<item>
@@ -77,6 +79,7 @@
<key> <string>script_name</string> </key>
<value>
<list>
+ <string>SubscriptionForm_setEmail</string>
<string>checkAccountInexistance</string>
</list>
</value>
Added: erp5/trunk/bt5/erp5_egov/WorkflowTemplateItem/portal_workflow/egov_interaction_workflow/scripts/SubscriptionForm_setEmail.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_egov/WorkflowTemplateItem/portal_workflow/egov_interaction_workflow/scripts/SubscriptionForm_setEmail.xml?rev=24612&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_egov/WorkflowTemplateItem/portal_workflow/egov_interaction_workflow/scripts/SubscriptionForm_setEmail.xml (added)
+++ erp5/trunk/bt5/erp5_egov/WorkflowTemplateItem/portal_workflow/egov_interaction_workflow/scripts/SubscriptionForm_setEmail.xml [utf8] Mon Nov 17 17:56:57 2008
@@ -1,0 +1,128 @@
+<?xml version="1.0"?>
+<ZopeData>
+ <record id="1" aka="AAAAAAAAAAE=">
+ <pickle>
+ <tuple>
+ <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+ <tuple/>
+ </tuple>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <item>
+ <key> <string>Script_magic</string> </key>
+ <value> <int>3</int> </value>
+ </item>
+ <item>
+ <key> <string>_bind_names</string> </key>
+ <value>
+ <object>
+ <klass>
+ <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
+ </klass>
+ <tuple/>
+ <state>
+ <dictionary>
+ <item>
+ <key> <string>_asgns</string> </key>
+ <value>
+ <dictionary>
+ <item>
+ <key> <string>name_container</string> </key>
+ <value> <string>container</string> </value>
+ </item>
+ <item>
+ <key> <string>name_context</string> </key>
+ <value> <string>context</string> </value>
+ </item>
+ <item>
+ <key> <string>name_m_self</string> </key>
+ <value> <string>script</string> </value>
+ </item>
+ <item>
+ <key> <string>name_subpath</string> </key>
+ <value> <string>traverse_subpath</string> </value>
+ </item>
+ </dictionary>
+ </value>
+ </item>
+ </dictionary>
+ </state>
+ </object>
+ </value>
+ </item>
+ <item>
+ <key> <string>_body</string> </key>
+ <value> <string># this script set the email of the form using the accountant email :\n
+form = state_change[\'object\']\n
+email = form.getAccountantEmail()\n
+form.setDefaultEmailText(email)\n
+</string> </value>
+ </item>
+ <item>
+ <key> <string>_code</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_params</string> </key>
+ <value> <string>state_change</string> </value>
+ </item>
+ <item>
+ <key> <string>errors</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ <item>
+ <key> <string>func_code</string> </key>
+ <value>
+ <object>
+ <klass>
+ <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
+ </klass>
+ <tuple/>
+ <state>
+ <dictionary>
+ <item>
+ <key> <string>co_argcount</string> </key>
+ <value> <int>1</int> </value>
+ </item>
+ <item>
+ <key> <string>co_varnames</string> </key>
+ <value>
+ <tuple>
+ <string>state_change</string>
+ <string>_getitem_</string>
+ <string>form</string>
+ <string>_getattr_</string>
+ <string>email</string>
+ </tuple>
+ </value>
+ </item>
+ </dictionary>
+ </state>
+ </object>
+ </value>
+ </item>
+ <item>
+ <key> <string>func_defaults</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>id</string> </key>
+ <value> <string>SubscriptionForm_setEmail</string> </value>
+ </item>
+ <item>
+ <key> <string>warnings</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Added: erp5/trunk/bt5/erp5_egov/WorkflowTemplateItem/portal_workflow/egov_interaction_workflow/scripts/sendNotificationByMail.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_egov/WorkflowTemplateItem/portal_workflow/egov_interaction_workflow/scripts/sendNotificationByMail.xml?rev=24612&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_egov/WorkflowTemplateItem/portal_workflow/egov_interaction_workflow/scripts/sendNotificationByMail.xml (added)
+++ erp5/trunk/bt5/erp5_egov/WorkflowTemplateItem/portal_workflow/egov_interaction_workflow/scripts/sendNotificationByMail.xml [utf8] Mon Nov 17 17:56:57 2008
@@ -1,0 +1,156 @@
+<?xml version="1.0"?>
+<ZopeData>
+ <record id="1" aka="AAAAAAAAAAE=">
+ <pickle>
+ <tuple>
+ <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+ <tuple/>
+ </tuple>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <item>
+ <key> <string>Script_magic</string> </key>
+ <value> <int>3</int> </value>
+ </item>
+ <item>
+ <key> <string>_bind_names</string> </key>
+ <value>
+ <object>
+ <klass>
+ <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
+ </klass>
+ <tuple/>
+ <state>
+ <dictionary>
+ <item>
+ <key> <string>_asgns</string> </key>
+ <value>
+ <dictionary>
+ <item>
+ <key> <string>name_container</string> </key>
+ <value> <string>container</string> </value>
+ </item>
+ <item>
+ <key> <string>name_context</string> </key>
+ <value> <string>context</string> </value>
+ </item>
+ <item>
+ <key> <string>name_m_self</string> </key>
+ <value> <string>script</string> </value>
+ </item>
+ <item>
+ <key> <string>name_subpath</string> </key>
+ <value> <string>traverse_subpath</string> </value>
+ </item>
+ </dictionary>
+ </value>
+ </item>
+ </dictionary>
+ </state>
+ </object>
+ </value>
+ </item>
+ <item>
+ <key> <string>_body</string> </key>
+ <value> <string>"""\n
+This script notify the user that the form has been submitted\n
+"""\n
+from Products.DCWorkflow.DCWorkflow import ValidationFailed\n
+\n
+\n
+translateString = context.Base_translateString\n
+portal_catalog = context.portal_catalog\n
+\n
+form = state_change[\'object\']\n
+\n
+# Build the message and translate it\n
+msg = []\n
+subject = translateString("Your application has been submitted successfully under the reference") + " : " + form.getId()\n
+msg.append(subject)\n
+msg.append(translateString("An Agent will review your application shortly. You will be notified by email whenever your application will start being processed. To further track your application, connect and login any time to the following site"))\n
+msg.append(context.getWebSiteValue().getAbsoluteUrl())\n
+msg.append(translateString("And use the login") + " : " + form.getReference()\n
+msg.append(translateString("and the password") + " : " + form.getPassword())\n
+\n
+msg = "\\n".join(msg)\n
+\n
+# We can now notify the accoutant through the notification tool\n
+context.portal_notifications.sendMessage(recipient=form.getReference(), \n
+ subject=subject, message=msg, portal_type_list=(\'Subscription Form\'),\n
+ store_as_event=True)\n
+</string> </value>
+ </item>
+ <item>
+ <key> <string>_code</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_params</string> </key>
+ <value> <string>state_change</string> </value>
+ </item>
+ <item>
+ <key> <string>_proxy_roles</string> </key>
+ <value>
+ <tuple>
+ <string>Assignor</string>
+ <string>Manager</string>
+ <string>Owner</string>
+ </tuple>
+ </value>
+ </item>
+ <item>
+ <key> <string>errors</string> </key>
+ <value>
+ <tuple>
+ <string>invalid syntax (Script (Python), line 19)</string>
+ </tuple>
+ </value>
+ </item>
+ <item>
+ <key> <string>func_code</string> </key>
+ <value>
+ <object>
+ <klass>
+ <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
+ </klass>
+ <tuple/>
+ <state>
+ <dictionary>
+ <item>
+ <key> <string>co_argcount</string> </key>
+ <value> <int>0</int> </value>
+ </item>
+ <item>
+ <key> <string>co_varnames</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ </dictionary>
+ </state>
+ </object>
+ </value>
+ </item>
+ <item>
+ <key> <string>func_defaults</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ <item>
+ <key> <string>id</string> </key>
+ <value> <string>sendNotificationByMail</string> </value>
+ </item>
+ <item>
+ <key> <string>warnings</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Modified: erp5/trunk/bt5/erp5_egov/bt/change_log
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_egov/bt/change_log?rev=24612&r1=24611&r2=24612&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_egov/bt/change_log [utf8] (original)
+++ erp5/trunk/bt5/erp5_egov/bt/change_log [utf8] Mon Nov 17 17:56:57 2008
@@ -1,3 +1,6 @@
+2008-11-17 fabien
+* add workflow scripts to send notification by email
+
2008-11-17 mohamadou
* update workflow script for new form.
Modified: erp5/trunk/bt5/erp5_egov/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_egov/bt/revision?rev=24612&r1=24611&r2=24612&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_egov/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_egov/bt/revision [utf8] Mon Nov 17 17:56:57 2008
@@ -1,1 +1,1 @@
-449
+451
More information about the Erp5-report
mailing list