related to issue 39649: added process definition to test e-mail events feature
authorCarlos Aristu <carlos.aristu@openbravo.com>
Tue, 20 Nov 2018 17:09:17 +0100
changeset 36 81095ca78e7d
parent 35 f65eaa3b9aad
child 37 654e9dc49c47
related to issue 39649: added process definition to test e-mail events feature
src-db/database/sourcedata/AD_MENU.xml
src-db/database/sourcedata/AD_TREENODE.xml
src-db/database/sourcedata/OBUIAPP_PARAMETER.xml
src-db/database/sourcedata/OBUIAPP_PROCESS.xml
src/org/openbravo/platform/features/email/EmailGenerator.java
src/org/openbravo/platform/features/process/SendEmailActionHandler.java
--- a/src-db/database/sourcedata/AD_MENU.xml	Fri Apr 06 08:45:22 2018 +0200
+++ b/src-db/database/sourcedata/AD_MENU.xml	Tue Nov 20 17:09:17 2018 +0100
@@ -104,6 +104,31 @@
 <!--99D90C58A57A4E349617FFB8D1308D3C-->  <OPENLINKINBROWSER><![CDATA[N]]></OPENLINKINBROWSER>
 <!--99D90C58A57A4E349617FFB8D1308D3C--></AD_MENU>
 
+<!--C2DC68A405F34B888CED05F2FF577DEA--><AD_MENU>
+<!--C2DC68A405F34B888CED05F2FF577DEA-->  <AD_MENU_ID><![CDATA[C2DC68A405F34B888CED05F2FF577DEA]]></AD_MENU_ID>
+<!--C2DC68A405F34B888CED05F2FF577DEA-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--C2DC68A405F34B888CED05F2FF577DEA-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--C2DC68A405F34B888CED05F2FF577DEA-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--C2DC68A405F34B888CED05F2FF577DEA-->  <NAME><![CDATA[Send Email]]></NAME>
+<!--C2DC68A405F34B888CED05F2FF577DEA-->  <DESCRIPTION><![CDATA[A process to test e-mail events feature]]></DESCRIPTION>
+<!--C2DC68A405F34B888CED05F2FF577DEA-->  <ISSUMMARY><![CDATA[N]]></ISSUMMARY>
+<!--C2DC68A405F34B888CED05F2FF577DEA-->  <ACTION><![CDATA[OBUIAPP_Process]]></ACTION>
+<!--C2DC68A405F34B888CED05F2FF577DEA-->  <AD_MODULE_ID><![CDATA[F2E7A973F06D438B85FFFB96E69670D4]]></AD_MODULE_ID>
+<!--C2DC68A405F34B888CED05F2FF577DEA-->  <OPENLINKINBROWSER><![CDATA[N]]></OPENLINKINBROWSER>
+<!--C2DC68A405F34B888CED05F2FF577DEA-->  <EM_OBUIAPP_PROCESS_ID><![CDATA[837ED85F96334EFBB83BEBC88B59DDF2]]></EM_OBUIAPP_PROCESS_ID>
+<!--C2DC68A405F34B888CED05F2FF577DEA--></AD_MENU>
+
+<!--D86B357083C746D791B557A5D8FA4164--><AD_MENU>
+<!--D86B357083C746D791B557A5D8FA4164-->  <AD_MENU_ID><![CDATA[D86B357083C746D791B557A5D8FA4164]]></AD_MENU_ID>
+<!--D86B357083C746D791B557A5D8FA4164-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--D86B357083C746D791B557A5D8FA4164-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--D86B357083C746D791B557A5D8FA4164-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--D86B357083C746D791B557A5D8FA4164-->  <NAME><![CDATA[Platform Features Testing]]></NAME>
+<!--D86B357083C746D791B557A5D8FA4164-->  <ISSUMMARY><![CDATA[Y]]></ISSUMMARY>
+<!--D86B357083C746D791B557A5D8FA4164-->  <AD_MODULE_ID><![CDATA[F2E7A973F06D438B85FFFB96E69670D4]]></AD_MODULE_ID>
+<!--D86B357083C746D791B557A5D8FA4164-->  <OPENLINKINBROWSER><![CDATA[N]]></OPENLINKINBROWSER>
+<!--D86B357083C746D791B557A5D8FA4164--></AD_MENU>
+
 <!--F241A1DAA0F6435D850AF6288DE3EA42--><AD_MENU>
 <!--F241A1DAA0F6435D850AF6288DE3EA42-->  <AD_MENU_ID><![CDATA[F241A1DAA0F6435D850AF6288DE3EA42]]></AD_MENU_ID>
 <!--F241A1DAA0F6435D850AF6288DE3EA42-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_TREENODE.xml	Fri Apr 06 08:45:22 2018 +0200
+++ b/src-db/database/sourcedata/AD_TREENODE.xml	Tue Nov 20 17:09:17 2018 +0100
@@ -7,8 +7,8 @@
 <!--0C004773EAA44E75B6CCA61F7DED3AD3-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
 <!--0C004773EAA44E75B6CCA61F7DED3AD3-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--0C004773EAA44E75B6CCA61F7DED3AD3-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--0C004773EAA44E75B6CCA61F7DED3AD3-->  <PARENT_ID><![CDATA[0]]></PARENT_ID>
-<!--0C004773EAA44E75B6CCA61F7DED3AD3-->  <SEQNO><![CDATA[999]]></SEQNO>
+<!--0C004773EAA44E75B6CCA61F7DED3AD3-->  <PARENT_ID><![CDATA[D86B357083C746D791B557A5D8FA4164]]></PARENT_ID>
+<!--0C004773EAA44E75B6CCA61F7DED3AD3-->  <SEQNO><![CDATA[70]]></SEQNO>
 <!--0C004773EAA44E75B6CCA61F7DED3AD3--></AD_TREENODE>
 
 <!--0D152AFB8EB7E8CAE050007F01001A4B--><AD_TREENODE>
@@ -18,8 +18,8 @@
 <!--0D152AFB8EB7E8CAE050007F01001A4B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
 <!--0D152AFB8EB7E8CAE050007F01001A4B-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--0D152AFB8EB7E8CAE050007F01001A4B-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--0D152AFB8EB7E8CAE050007F01001A4B-->  <PARENT_ID><![CDATA[0]]></PARENT_ID>
-<!--0D152AFB8EB7E8CAE050007F01001A4B-->  <SEQNO><![CDATA[999]]></SEQNO>
+<!--0D152AFB8EB7E8CAE050007F01001A4B-->  <PARENT_ID><![CDATA[D86B357083C746D791B557A5D8FA4164]]></PARENT_ID>
+<!--0D152AFB8EB7E8CAE050007F01001A4B-->  <SEQNO><![CDATA[20]]></SEQNO>
 <!--0D152AFB8EB7E8CAE050007F01001A4B--></AD_TREENODE>
 
 <!--2AC215B977EB4F2EB2DEAD6B1FDDD70C--><AD_TREENODE>
@@ -29,10 +29,32 @@
 <!--2AC215B977EB4F2EB2DEAD6B1FDDD70C-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
 <!--2AC215B977EB4F2EB2DEAD6B1FDDD70C-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--2AC215B977EB4F2EB2DEAD6B1FDDD70C-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--2AC215B977EB4F2EB2DEAD6B1FDDD70C-->  <PARENT_ID><![CDATA[0]]></PARENT_ID>
-<!--2AC215B977EB4F2EB2DEAD6B1FDDD70C-->  <SEQNO><![CDATA[999]]></SEQNO>
+<!--2AC215B977EB4F2EB2DEAD6B1FDDD70C-->  <PARENT_ID><![CDATA[D86B357083C746D791B557A5D8FA4164]]></PARENT_ID>
+<!--2AC215B977EB4F2EB2DEAD6B1FDDD70C-->  <SEQNO><![CDATA[90]]></SEQNO>
 <!--2AC215B977EB4F2EB2DEAD6B1FDDD70C--></AD_TREENODE>
 
+<!--2EAC5DA3A6DD4132A855FC6D56D272D2--><AD_TREENODE>
+<!--2EAC5DA3A6DD4132A855FC6D56D272D2-->  <AD_TREENODE_ID><![CDATA[2EAC5DA3A6DD4132A855FC6D56D272D2]]></AD_TREENODE_ID>
+<!--2EAC5DA3A6DD4132A855FC6D56D272D2-->  <AD_TREE_ID><![CDATA[10]]></AD_TREE_ID>
+<!--2EAC5DA3A6DD4132A855FC6D56D272D2-->  <NODE_ID><![CDATA[D86B357083C746D791B557A5D8FA4164]]></NODE_ID>
+<!--2EAC5DA3A6DD4132A855FC6D56D272D2-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--2EAC5DA3A6DD4132A855FC6D56D272D2-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--2EAC5DA3A6DD4132A855FC6D56D272D2-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--2EAC5DA3A6DD4132A855FC6D56D272D2-->  <PARENT_ID><![CDATA[0]]></PARENT_ID>
+<!--2EAC5DA3A6DD4132A855FC6D56D272D2-->  <SEQNO><![CDATA[100]]></SEQNO>
+<!--2EAC5DA3A6DD4132A855FC6D56D272D2--></AD_TREENODE>
+
+<!--64FFA6DDD9444227BF3B7EE496A33986--><AD_TREENODE>
+<!--64FFA6DDD9444227BF3B7EE496A33986-->  <AD_TREENODE_ID><![CDATA[64FFA6DDD9444227BF3B7EE496A33986]]></AD_TREENODE_ID>
+<!--64FFA6DDD9444227BF3B7EE496A33986-->  <AD_TREE_ID><![CDATA[10]]></AD_TREE_ID>
+<!--64FFA6DDD9444227BF3B7EE496A33986-->  <NODE_ID><![CDATA[C2DC68A405F34B888CED05F2FF577DEA]]></NODE_ID>
+<!--64FFA6DDD9444227BF3B7EE496A33986-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--64FFA6DDD9444227BF3B7EE496A33986-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--64FFA6DDD9444227BF3B7EE496A33986-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--64FFA6DDD9444227BF3B7EE496A33986-->  <PARENT_ID><![CDATA[D86B357083C746D791B557A5D8FA4164]]></PARENT_ID>
+<!--64FFA6DDD9444227BF3B7EE496A33986-->  <SEQNO><![CDATA[100]]></SEQNO>
+<!--64FFA6DDD9444227BF3B7EE496A33986--></AD_TREENODE>
+
 <!--87D361037BB64278A1E2742B92C3ABFF--><AD_TREENODE>
 <!--87D361037BB64278A1E2742B92C3ABFF-->  <AD_TREENODE_ID><![CDATA[87D361037BB64278A1E2742B92C3ABFF]]></AD_TREENODE_ID>
 <!--87D361037BB64278A1E2742B92C3ABFF-->  <AD_TREE_ID><![CDATA[10]]></AD_TREE_ID>
@@ -40,7 +62,7 @@
 <!--87D361037BB64278A1E2742B92C3ABFF-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
 <!--87D361037BB64278A1E2742B92C3ABFF-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--87D361037BB64278A1E2742B92C3ABFF-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--87D361037BB64278A1E2742B92C3ABFF-->  <PARENT_ID><![CDATA[2A9C76BF94F8437E96F4F43DF8D95B53]]></PARENT_ID>
+<!--87D361037BB64278A1E2742B92C3ABFF-->  <PARENT_ID><![CDATA[D86B357083C746D791B557A5D8FA4164]]></PARENT_ID>
 <!--87D361037BB64278A1E2742B92C3ABFF-->  <SEQNO><![CDATA[10]]></SEQNO>
 <!--87D361037BB64278A1E2742B92C3ABFF--></AD_TREENODE>
 
@@ -51,8 +73,8 @@
 <!--AB43B86DEE9E4C1491ED483670E53DC6-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
 <!--AB43B86DEE9E4C1491ED483670E53DC6-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--AB43B86DEE9E4C1491ED483670E53DC6-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--AB43B86DEE9E4C1491ED483670E53DC6-->  <PARENT_ID><![CDATA[0]]></PARENT_ID>
-<!--AB43B86DEE9E4C1491ED483670E53DC6-->  <SEQNO><![CDATA[999]]></SEQNO>
+<!--AB43B86DEE9E4C1491ED483670E53DC6-->  <PARENT_ID><![CDATA[D86B357083C746D791B557A5D8FA4164]]></PARENT_ID>
+<!--AB43B86DEE9E4C1491ED483670E53DC6-->  <SEQNO><![CDATA[60]]></SEQNO>
 <!--AB43B86DEE9E4C1491ED483670E53DC6--></AD_TREENODE>
 
 <!--AE04CF1433A045A981310D6C95420F8D--><AD_TREENODE>
@@ -62,8 +84,8 @@
 <!--AE04CF1433A045A981310D6C95420F8D-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
 <!--AE04CF1433A045A981310D6C95420F8D-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--AE04CF1433A045A981310D6C95420F8D-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--AE04CF1433A045A981310D6C95420F8D-->  <PARENT_ID><![CDATA[0]]></PARENT_ID>
-<!--AE04CF1433A045A981310D6C95420F8D-->  <SEQNO><![CDATA[999]]></SEQNO>
+<!--AE04CF1433A045A981310D6C95420F8D-->  <PARENT_ID><![CDATA[D86B357083C746D791B557A5D8FA4164]]></PARENT_ID>
+<!--AE04CF1433A045A981310D6C95420F8D-->  <SEQNO><![CDATA[30]]></SEQNO>
 <!--AE04CF1433A045A981310D6C95420F8D--></AD_TREENODE>
 
 <!--C402E0F412A141F381AE969CCF09C7A2--><AD_TREENODE>
@@ -73,8 +95,8 @@
 <!--C402E0F412A141F381AE969CCF09C7A2-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
 <!--C402E0F412A141F381AE969CCF09C7A2-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--C402E0F412A141F381AE969CCF09C7A2-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--C402E0F412A141F381AE969CCF09C7A2-->  <PARENT_ID><![CDATA[0]]></PARENT_ID>
-<!--C402E0F412A141F381AE969CCF09C7A2-->  <SEQNO><![CDATA[999]]></SEQNO>
+<!--C402E0F412A141F381AE969CCF09C7A2-->  <PARENT_ID><![CDATA[D86B357083C746D791B557A5D8FA4164]]></PARENT_ID>
+<!--C402E0F412A141F381AE969CCF09C7A2-->  <SEQNO><![CDATA[50]]></SEQNO>
 <!--C402E0F412A141F381AE969CCF09C7A2--></AD_TREENODE>
 
 <!--D90C769B40CB4E9CBBE8D7867CAA2227--><AD_TREENODE>
@@ -84,8 +106,8 @@
 <!--D90C769B40CB4E9CBBE8D7867CAA2227-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
 <!--D90C769B40CB4E9CBBE8D7867CAA2227-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--D90C769B40CB4E9CBBE8D7867CAA2227-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--D90C769B40CB4E9CBBE8D7867CAA2227-->  <PARENT_ID><![CDATA[0]]></PARENT_ID>
-<!--D90C769B40CB4E9CBBE8D7867CAA2227-->  <SEQNO><![CDATA[999]]></SEQNO>
+<!--D90C769B40CB4E9CBBE8D7867CAA2227-->  <PARENT_ID><![CDATA[D86B357083C746D791B557A5D8FA4164]]></PARENT_ID>
+<!--D90C769B40CB4E9CBBE8D7867CAA2227-->  <SEQNO><![CDATA[80]]></SEQNO>
 <!--D90C769B40CB4E9CBBE8D7867CAA2227--></AD_TREENODE>
 
 <!--FB21148CC4084B248F783744C883AB71--><AD_TREENODE>
@@ -95,8 +117,8 @@
 <!--FB21148CC4084B248F783744C883AB71-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
 <!--FB21148CC4084B248F783744C883AB71-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--FB21148CC4084B248F783744C883AB71-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--FB21148CC4084B248F783744C883AB71-->  <PARENT_ID><![CDATA[0]]></PARENT_ID>
-<!--FB21148CC4084B248F783744C883AB71-->  <SEQNO><![CDATA[999]]></SEQNO>
+<!--FB21148CC4084B248F783744C883AB71-->  <PARENT_ID><![CDATA[D86B357083C746D791B557A5D8FA4164]]></PARENT_ID>
+<!--FB21148CC4084B248F783744C883AB71-->  <SEQNO><![CDATA[40]]></SEQNO>
 <!--FB21148CC4084B248F783744C883AB71--></AD_TREENODE>
 
 </data>
--- a/src-db/database/sourcedata/OBUIAPP_PARAMETER.xml	Fri Apr 06 08:45:22 2018 +0200
+++ b/src-db/database/sourcedata/OBUIAPP_PARAMETER.xml	Tue Nov 20 17:09:17 2018 +0100
@@ -149,4 +149,29 @@
 <!--F014AB92F33B4847BBD0EDB76515367C-->  <ATT_SHOWINDESCRIPTION><![CDATA[N]]></ATT_SHOWINDESCRIPTION>
 <!--F014AB92F33B4847BBD0EDB76515367C--></OBUIAPP_PARAMETER>
 
+<!--F5479839482D4BC7BDE329B46C2A81F0--><OBUIAPP_PARAMETER>
+<!--F5479839482D4BC7BDE329B46C2A81F0-->  <OBUIAPP_PARAMETER_ID><![CDATA[F5479839482D4BC7BDE329B46C2A81F0]]></OBUIAPP_PARAMETER_ID>
+<!--F5479839482D4BC7BDE329B46C2A81F0-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--F5479839482D4BC7BDE329B46C2A81F0-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--F5479839482D4BC7BDE329B46C2A81F0-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--F5479839482D4BC7BDE329B46C2A81F0-->  <AD_MODULE_ID><![CDATA[F2E7A973F06D438B85FFFB96E69670D4]]></AD_MODULE_ID>
+<!--F5479839482D4BC7BDE329B46C2A81F0-->  <NAME><![CDATA[Email]]></NAME>
+<!--F5479839482D4BC7BDE329B46C2A81F0-->  <DESCRIPTION><![CDATA[An email address for a specified business partner.]]></DESCRIPTION>
+<!--F5479839482D4BC7BDE329B46C2A81F0-->  <HELP><![CDATA[The Email Address is the Electronic Mail ID for this User and should be fully qualified (e.g. joe.smith@company.com).]]></HELP>
+<!--F5479839482D4BC7BDE329B46C2A81F0-->  <SEQNO><![CDATA[10]]></SEQNO>
+<!--F5479839482D4BC7BDE329B46C2A81F0-->  <AD_REFERENCE_ID><![CDATA[10]]></AD_REFERENCE_ID>
+<!--F5479839482D4BC7BDE329B46C2A81F0-->  <COLUMNNAME><![CDATA[email]]></COLUMNNAME>
+<!--F5479839482D4BC7BDE329B46C2A81F0-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--F5479839482D4BC7BDE329B46C2A81F0-->  <FIELDLENGTH><![CDATA[60]]></FIELDLENGTH>
+<!--F5479839482D4BC7BDE329B46C2A81F0-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--F5479839482D4BC7BDE329B46C2A81F0-->  <AD_ELEMENT_ID><![CDATA[881]]></AD_ELEMENT_ID>
+<!--F5479839482D4BC7BDE329B46C2A81F0-->  <ISFIXED><![CDATA[N]]></ISFIXED>
+<!--F5479839482D4BC7BDE329B46C2A81F0-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
+<!--F5479839482D4BC7BDE329B46C2A81F0-->  <OBUIAPP_PROCESS_ID><![CDATA[837ED85F96334EFBB83BEBC88B59DDF2]]></OBUIAPP_PROCESS_ID>
+<!--F5479839482D4BC7BDE329B46C2A81F0-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--F5479839482D4BC7BDE329B46C2A81F0-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--F5479839482D4BC7BDE329B46C2A81F0-->  <DISPLAYTITLE><![CDATA[Y]]></DISPLAYTITLE>
+<!--F5479839482D4BC7BDE329B46C2A81F0-->  <ATT_SHOWINDESCRIPTION><![CDATA[N]]></ATT_SHOWINDESCRIPTION>
+<!--F5479839482D4BC7BDE329B46C2A81F0--></OBUIAPP_PARAMETER>
+
 </data>
--- a/src-db/database/sourcedata/OBUIAPP_PROCESS.xml	Fri Apr 06 08:45:22 2018 +0200
+++ b/src-db/database/sourcedata/OBUIAPP_PROCESS.xml	Tue Nov 20 17:09:17 2018 +0100
@@ -56,6 +56,26 @@
 <!--70889433974B409BAC4F9D7BFB211248-->  <ISCANADDRECORDSTOSELECTOR><![CDATA[N]]></ISCANADDRECORDSTOSELECTOR>
 <!--70889433974B409BAC4F9D7BFB211248--></OBUIAPP_PROCESS>
 
+<!--837ED85F96334EFBB83BEBC88B59DDF2--><OBUIAPP_PROCESS>
+<!--837ED85F96334EFBB83BEBC88B59DDF2-->  <OBUIAPP_PROCESS_ID><![CDATA[837ED85F96334EFBB83BEBC88B59DDF2]]></OBUIAPP_PROCESS_ID>
+<!--837ED85F96334EFBB83BEBC88B59DDF2-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--837ED85F96334EFBB83BEBC88B59DDF2-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--837ED85F96334EFBB83BEBC88B59DDF2-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--837ED85F96334EFBB83BEBC88B59DDF2-->  <VALUE><![CDATA[OBPF_SendEmail]]></VALUE>
+<!--837ED85F96334EFBB83BEBC88B59DDF2-->  <NAME><![CDATA[Send Email]]></NAME>
+<!--837ED85F96334EFBB83BEBC88B59DDF2-->  <DESCRIPTION><![CDATA[A process to test e-mail events feature]]></DESCRIPTION>
+<!--837ED85F96334EFBB83BEBC88B59DDF2-->  <HELP><![CDATA[A process to test e-mail events feature. See: http://wiki.openbravo.com/wiki/How_to_send_emails_on_events]]></HELP>
+<!--837ED85F96334EFBB83BEBC88B59DDF2-->  <ACCESSLEVEL><![CDATA[3]]></ACCESSLEVEL>
+<!--837ED85F96334EFBB83BEBC88B59DDF2-->  <CLASSNAME><![CDATA[org.openbravo.platform.features.process.SendEmailActionHandler]]></CLASSNAME>
+<!--837ED85F96334EFBB83BEBC88B59DDF2-->  <ISBACKGROUND><![CDATA[N]]></ISBACKGROUND>
+<!--837ED85F96334EFBB83BEBC88B59DDF2-->  <AD_MODULE_ID><![CDATA[F2E7A973F06D438B85FFFB96E69670D4]]></AD_MODULE_ID>
+<!--837ED85F96334EFBB83BEBC88B59DDF2-->  <UIPATTERN><![CDATA[OBUIAPP_PickAndExecute]]></UIPATTERN>
+<!--837ED85F96334EFBB83BEBC88B59DDF2-->  <ISMULTIRECORD><![CDATA[N]]></ISMULTIRECORD>
+<!--837ED85F96334EFBB83BEBC88B59DDF2-->  <IS_EXPLICIT_ACCESS><![CDATA[N]]></IS_EXPLICIT_ACCESS>
+<!--837ED85F96334EFBB83BEBC88B59DDF2-->  <ISGRIDLEGACY><![CDATA[N]]></ISGRIDLEGACY>
+<!--837ED85F96334EFBB83BEBC88B59DDF2-->  <ISCANADDRECORDSTOSELECTOR><![CDATA[N]]></ISCANADDRECORDSTOSELECTOR>
+<!--837ED85F96334EFBB83BEBC88B59DDF2--></OBUIAPP_PROCESS>
+
 <!--A22C86AACD474BBC97349A29DCD51785--><OBUIAPP_PROCESS>
 <!--A22C86AACD474BBC97349A29DCD51785-->  <OBUIAPP_PROCESS_ID><![CDATA[A22C86AACD474BBC97349A29DCD51785]]></OBUIAPP_PROCESS_ID>
 <!--A22C86AACD474BBC97349A29DCD51785-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/openbravo/platform/features/email/EmailGenerator.java	Tue Nov 20 17:09:17 2018 +0100
@@ -0,0 +1,76 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo SLU
+ * All portions are Copyright (C) 2018 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ *************************************************************************
+ */
+
+package org.openbravo.platform.features.email;
+
+import java.io.File;
+import java.util.Collections;
+import java.util.List;
+
+import org.openbravo.email.EmailEventContentGenerator;
+import org.openbravo.email.EmailEventManager;
+import org.openbravo.model.ad.access.User;
+
+/**
+ * Class in charge of generating the content for the email when the "EVT_NAME" email event is
+ * triggered by the {@link EmailEventManager}.
+ */
+public class EmailGenerator implements EmailEventContentGenerator {
+
+  @Override
+  public boolean isValidEvent(String event, Object data) {
+    return "EVT_NAME".equals(event);
+  }
+
+  @Override
+  public String getSubject(Object data, String event) {
+    return "New email for you";
+  }
+
+  @Override
+  public String getBody(Object data, String event) {
+    User usr = (User) data;
+    return "Hello " + usr.getFirstName();
+  }
+
+  @Override
+  public String getContentType() {
+    return "text/plain; charset=utf-8";
+  }
+
+  @Override
+  public int getPriority() {
+    return 0;
+  }
+
+  @Override
+  public boolean preventsOthersExecution() {
+    return false;
+  }
+
+  @Override
+  public boolean isAsynchronous() {
+    return false;
+  }
+
+  @Override
+  public List<File> getAttachments(Object data, String event) {
+    return Collections.emptyList();
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/openbravo/platform/features/process/SendEmailActionHandler.java	Tue Nov 20 17:09:17 2018 +0100
@@ -0,0 +1,70 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo SLU
+ * All portions are Copyright (C) 2018 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ *************************************************************************
+ */
+package org.openbravo.platform.features.process;
+
+import java.util.Map;
+
+import javax.inject.Inject;
+
+import org.codehaus.jettison.json.JSONObject;
+import org.openbravo.client.application.process.BaseProcessActionHandler;
+import org.openbravo.client.application.process.ResponseActionsBuilder.MessageType;
+import org.openbravo.dal.core.OBContext;
+import org.openbravo.email.EmailEventManager;
+import org.openbravo.platform.features.email.EmailGenerator;
+
+/**
+ * Action handler to test the e-mail events feature. The content of the email will be generated with
+ * the {@link EmailGenerator} class.
+ */
+public class SendEmailActionHandler extends BaseProcessActionHandler {
+
+  @Inject
+  private EmailEventManager emailEventManager;
+
+  @Override
+  protected JSONObject doExecute(Map<String, Object> parameters, String content) {
+    try {
+      JSONObject jsonContent = new JSONObject(content);
+      JSONObject jsonParams = jsonContent.getJSONObject("_params");
+      String email = jsonParams.getString("email");
+
+      boolean sent = emailEventManager.sendEmail("EVT_NAME", email, OBContext.getOBContext()
+          .getUser());
+
+      return sent ? getSuccessResponse("Email sent") : getErrorResponse("Email not sent");
+
+    } catch (Exception e) {
+      return getErrorResponse(e.getMessage());
+    }
+  }
+
+  private JSONObject getSuccessResponse(String message) {
+    return getResponseBuilder() //
+        .showMsgInProcessView(MessageType.SUCCESS, message) //
+        .build();
+  }
+
+  private JSONObject getErrorResponse(String message) {
+    return getResponseBuilder() //
+        .showMsgInProcessView(MessageType.ERROR, message) //
+        .build();
+  }
+
+}