cancel
Showing results for 
Search instead for 
Did you mean: 

Serial Review with email notifications

cafeguy
Champ in-the-making
Champ in-the-making
Hi,
  I'm new to Alfresco.  I'm trying to set up a serial review activiti workflow with email notification to the initiator every time a reviewer either rejects or approves a workflow.  So, if there are 5 reviewers, 5 emails would be sent to the initiator whenever each reviewer either approves or rejects.

In Activity, I setup an AlfrescoMailTask and added the mail.parameters below.  Somehow it's not sending any email at all.  Can someone tell me what I'm missing? 


OS : Windows 7
Java 7 , Tomcat 7.0.54
Alfresco community 4.2.a.

Thanks in advance for any advice.

<serviceTask id="alfrescoMailtask1" name="Alfresco Approved Mail Task" activiti:class="org.alfresco.repo.workflow.activiti.script.AlfrescoScriptDelegate">
      <extensionElements>
        <activiti:field name="script">
          <activiti:string><![CDATA[var mail = actions.create("mail");
          alert('approved email ');
          mail.parameters.to = "cafeguy@mycomp.com";
            mail.parameters.subject = "Adhoc Task APPROVED " + bpm_workflowDescription;
            mail.parameters.from = "cafeguy@mycomp.com";
            mail.parameters.text = "It's done";
mail.execute(bpm_package);]]></activiti:string>
        </activiti:field>
      </extensionElements>
    </serviceTask>
    <sequenceFlow id="flow5" sourceRef="approved" targetRef="alfrescoMailtask1"></sequenceFlow>
    <serviceTask id="alfrescoMailtask2" name="Alfresco Rejected Mail Task" activiti:class="org.alfresco.repo.workflow.activiti.script.AlfrescoScriptDelegate">
      <extensionElements>
        <activiti:field name="script">
          <activiti:string><![CDATA[var mail = actions.create("mail");
          alert('rejected email ');
          mail.parameters.to = "cafeguy@mycomp.com";
            mail.parameters.subject = "Adhoc Task REJECTED " + bpm_workflowDescription;
            mail.parameters.from = "cafeguy@mycomp.com";
            mail.parameters.text = "It's done";         
mail.execute(bpm_package);]]></activiti:string>
        </activiti:field>
      </extensionElements>
    </serviceTask>
1 REPLY 1

cafeguy
Champ in-the-making
Champ in-the-making
The XML I input into the message disappeared, so I attached it with file name activity_mail.txt
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.