AnsweredAssumed Answered

[SOLVED] email assignee when a task is complete

Question asked by sihnu on Apr 13, 2011
Latest reply on May 3, 2011 by sans
Hello

I would like to implement a behaviour so that when a task is completed an email is sent to the assigned user. The same way as it is done in Adhoc workflow. Here is the javascript copied from Adhoc processdefinition:

if (tm_notifyMe)
   {
   var mail = actions.create("mail");
   mail.parameters.to = initiator.properties.email;
   mail.parameters.subject = "Toimenpide " + bpm_workflowDescription;
   mail.parameters.from = bpm_assignee.properties["cm:email"];
   mail.parameters.text = "Suoritettu";
   mail.execute(bpm_package);
}

But I get this error when trying to complete the task: "org.alfresco.service.cmr.workflow.WorkflowException: 03130022 Failed to signal transition null from workflow task jbpm$11.". The user whom the email should have been sent has a proper gmail address defined as to his email address.

Outcomes