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
This commit is contained in:
Pavel Yurke
2013-09-02 16:49:05 +00:00
parent 3037423612
commit 6ad69e9f19

View File

@@ -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(),