cancel
Showing results for 
Search instead for 
Did you mean: 

Email on Assigning Task to a Colleague - Adhoc Task

joshua
Champ in-the-making
Champ in-the-making
Hi,

I am using Alfresco 3.4.0 (d).

Using alfresco share, i am assigning task to a colleague using Adhoc task. While assigning a task, i want a email notification to go to both creator and assignee. I tried using the following changes.

File placed in the location "/opt/alfresco-3.4.b/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/workflow" was changed as below.


<?xml version="1.0" encoding="UTF-8"?>

<process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="wf:adhoc">

   <swimlane name="initiator"/>

   <start-state name="start">
      <task name="wf:submitAdhocTask" swimlane="initiator"/>
      <transition name="" to="adhoc"/>
   </start-state>

   <swimlane name="assignee">
      <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
         <actor>#{bpm_assignee}</actor>
      </assignment>
   </swimlane>
  
   <task-node name="adhoc">
      <task name="wf:adhocTask" swimlane="assignee">
         <event type="task-create">
            <script>
               if (bpm_workflowDueDate != void) taskInstance.dueDate = bpm_workflowDueDate;
               if (bpm_workflowPriority != void) taskInstance.priority = bpm_workflowPriority;
            </script>
      <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
            <script>
                  {
               var mail = actions.create("mail");
               mail.parameters.to = bpm_assignee.properties.email;
               mail.parameters.subject = "Adhoc Task: " + bpm_workflowDescription;
               mail.parameters.from = initiator.properties.email;
               mail.parameters.template = companyhome.childByNamePath("Data Dictionary/Email Templates/Notify Email Templates/notify_user_assigned_task_email.ftl");
               mail.parameters.text = "A task was created.";
               mail.execute(bpm_package);
               }
      </script>
            </action>
         </event>
      </task>

      <transition name="" to="completed">
         <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
           <script>
              if (wf_notifyMe)
              {
                 var mail = actions.create("mail");
                 mail.parameters.to = initiator.properties.email;
                 mail.parameters.subject = "Adhoc Task: " + bpm_workflowDescription;
                 mail.parameters.from = bpm_assignee.properties.email;
    mail.parameters.template = companyhome.childByNamePath("Data Dictionary/Email Templates/Notify Email Templates/notify_initiator_completed_task_email.ftl");
                 mail.parameters.text = "This task is done.";
                 mail.execute(bpm_package);
              }
           </script>
         </action>
      </transition>
   </task-node>
  
   <task-node name="completed">
      <task name="wf:completedAdhocTask" swimlane="initiator"/>
      <transition name="" to="end"/>
   </task-node>
    
   <end-state name="end"/>
  
</process-definition>


Alfresco service was restarted after making the above changes, but I didnt get any email notification on assigning task.

Any help would be greatly appreciated.


Thanks,

Binu Manickkam.
3 REPLIES 3

joshua
Champ in-the-making
Champ in-the-making
Hi,

Can anyone guide me on the ibid issue.

Thanks,

Binu Manickkam.

joshua
Champ in-the-making
Champ in-the-making
Re: Email on Assigning Task to a Colleague - Adhoc Task

Hi,

Can anyone guide me on the ibid issue.

Thanks,

Binu Manickkam.

carlsutcliffe
Champ in-the-making
Champ in-the-making
In the information era, cell phones have brought much convenience to our daily life and play an important role. Most people even cannot live without the phone devices. However, in some special places such as library, church, hospitals and military where the cell phones are not allowed to be used, the signals of phone devices should be blocked to create a quiet condition to meet with people's requirement.Then the RF Jammer which can be got from http://www.jammerinthebox.com/categories/RF_Signal_Jammer/ comes to help with a powerful function of jamming various typs of signals.
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.