cancel
Showing results for 
Search instead for 
Did you mean: 

email notification during workflow

boneill
Star Contributor
Star Contributor
Hi All,

I want users to receive tasks during the wcm Web Site Submission  workflow informing them that they have a new task.  The wiki indicates that it should be standard functionality during the Web Site Submission workflow.  I have updated the custom-repository.properties under the Alfresco\tomcat\shared\classes\alfresco\extension directory with the following entries:

mail.host=172.16.17.10
mail.port=25
mail.username=admin   
mail.password=admin
# Set this value to UTF-8 or similar for encoding of email messages as required
mail.encoding=UTF-8
# Set this value to 7bit or similar for Asian encoding of email headers as required
mail.header=
mail.from.default=mikhail_anossovitch@nissan.com.au

However there are no emails being sent during the workflow process and there are no entries in the log files that give me any information about emails.

Am I correct in assuming that the email notifications are OOB functionality for the workflow or do I need to configure something else.  How can I trace what is happening with the email service.

Regards

Brian
5 REPLIES 5

boneill
Star Contributor
Star Contributor
Does anyone know if email notifications are supported in the WCM default workflow?

tommorris
Champ in-the-making
Champ in-the-making
Hi Boneill,

Have you seen this?
http://forums.alfresco.com/en/viewtopic.php?f=29&t=5797

It suggests that an email can be sent, but the templating feature isn't possible.
This means it wouldn't have a customised email body (and therefore not be very useful)….

Can anyone from alfresco update us on this topic?

Tom,
http://www.ixxus.com

mikef
Champ in-the-making
Champ in-the-making
It is possible to build the content of the email in the script itself using:

mail.parameters.text = "My message body…….";

See http://wiki.alfresco.com/wiki/JavaScript_API#ScriptAction_API for details.

Regards.

boneill
Star Contributor
Star Contributor
Hi,  I am currently looking at configuring advanced workflows in order to send email notifications from WCM default workflow.  The definition for the workflow is in the file submit_processdefinition.xml.  There is no action in this definition that triggers an email notification.  I therefore assume that email notifications are not sent by default from the WCM default workflow.  Can someone from alfresco confirm this please. 

Assuming I have to include the email notification into the process definition, what I think I have to do is add the following to each task_node in the workflow in order for a mail to be sent automatically to the owner of the task as each task is initiated.  The code below shows email notification for the serialreview task node.  Has anyone done this before, is this the correct approach:



<task-node name="serialreview">
        <task name="wcmwf:reviewTask">
           <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
              <actor>#{bpm_assignees.get(wcmwf_approveCnt)}</actor>
           </assignment>
           <event type="task-assign">
              <script>
                 if (wcmwf_reviewCycle > 1)
                    taskInstance.description = taskInstance.description + " (" + wcmwf_reviewCycle + ")";
              </script>
        <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
                <script>  
                 var mail = actions.create("mail");
                 mail.parameters.to = "brian.oneill@seedim.com.au";
                 mail.parameters.subject = "Rejected Task " + bpm_workflowDescription;
                 mail.parameters.from = bpm_assignee.properties.email;
                 mail.parameters.text = "It's done";
                 mail.execute(bpm_package);
               </script>
             </action>
           </event>          
        </task>

        <transition name="approve" to="submitserialreview">
      <script>
              <variable name="wcmwf_approveCnt" access="read, write"/>
              <expression>
                 wcmwf_approveCnt = wcmwf_approveCnt + 1;
              </expression>
           </script>
        </transition>
        <transition name="reject" to="endreview" />
    </task-node>

Any help greatly appreciated.

Regards

Brian

maclarenjc
Champ in-the-making
Champ in-the-making
Brian,

Did you ever get a reply from Alfresco or anyone?  I too want emails to be sent from the out of the box workflow - web site submission but it appears they do not generate by default.  So is only option to use advanced workflow?