From 6ad69e9f198644bd53080c8a314690326b21f47d Mon Sep 17 00:00:00 2001 From: Pavel Yurke Date: Mon, 2 Sep 2013 16:49:05 +0000 Subject: [PATCH] ALF-18548 Failed to start custom workflow if 'Send email notification' is enabled In TaskCreateListener.notify(DelegateTask) was added check (taskFormKey != null). git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@54796 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../activiti/tasklistener/TaskCreateListener.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/source/java/org/alfresco/repo/workflow/activiti/tasklistener/TaskCreateListener.java b/source/java/org/alfresco/repo/workflow/activiti/tasklistener/TaskCreateListener.java index 72473bb560..33c8633f83 100644 --- a/source/java/org/alfresco/repo/workflow/activiti/tasklistener/TaskCreateListener.java +++ b/source/java/org/alfresco/repo/workflow/activiti/tasklistener/TaskCreateListener.java @@ -128,9 +128,19 @@ public class TaskCreateListener implements TaskListener authorities = new String[]{task.getAssignee()}; } + String title; + if (taskFormKey != null) + { + title = taskFormKey.replace(":", "_"); + } + else + { + title = task.getName().replaceAll(" ", "_"); + } + // Send email notification String workflowDefId = task.getProcessDefinitionId().split(":")[0]; - String taskType = workflowDefId + ".task." + taskFormKey.replace(":", "_") + ".title"; + String taskType = workflowDefId + ".task." + title + ".title"; workflowNotificationUtils.sendWorkflowAssignedNotificationEMail( ActivitiConstants.ENGINE_ID + "$" + task.getId(),