mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
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:
@@ -128,9 +128,19 @@ public class TaskCreateListener implements TaskListener
|
|||||||
authorities = new String[]{task.getAssignee()};
|
authorities = new String[]{task.getAssignee()};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String title;
|
||||||
|
if (taskFormKey != null)
|
||||||
|
{
|
||||||
|
title = taskFormKey.replace(":", "_");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
title = task.getName().replaceAll(" ", "_");
|
||||||
|
}
|
||||||
|
|
||||||
// Send email notification
|
// Send email notification
|
||||||
String workflowDefId = task.getProcessDefinitionId().split(":")[0];
|
String workflowDefId = task.getProcessDefinitionId().split(":")[0];
|
||||||
String taskType = workflowDefId + ".task." + taskFormKey.replace(":", "_") + ".title";
|
String taskType = workflowDefId + ".task." + title + ".title";
|
||||||
|
|
||||||
workflowNotificationUtils.sendWorkflowAssignedNotificationEMail(
|
workflowNotificationUtils.sendWorkflowAssignedNotificationEMail(
|
||||||
ActivitiConstants.ENGINE_ID + "$" + task.getId(),
|
ActivitiConstants.ENGINE_ID + "$" + task.getId(),
|
||||||
|
Reference in New Issue
Block a user