mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
CLOUD-2178: Incorrect defaults used when no message is supplied when starting a hybrid workflow
CLOUD-2167: Notification emails for assigned tasks are not populated correctly NOTE: If no message is supplied the task type is used as the description rather than empty string in the email notification. Also fixed the task type display for "simple cloud task", now shows "Task" and not "Review". git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@57957 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -19,7 +19,7 @@
|
|||||||
sourceRef='start'
|
sourceRef='start'
|
||||||
targetRef='adhocTask' />
|
targetRef='adhocTask' />
|
||||||
|
|
||||||
<userTask id="adhocTask" name="Review Task"
|
<userTask id="adhocTask" name="Adhoc Task"
|
||||||
activiti:formKey="wf:adhocTask">
|
activiti:formKey="wf:adhocTask">
|
||||||
<extensionElements>
|
<extensionElements>
|
||||||
<activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
|
<activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
|
||||||
|
@@ -121,14 +121,14 @@ public class TaskNotificationListener implements TaskListener
|
|||||||
TypeDefinition typeDefinition = propertyConverter.getWorkflowObjectFactory().getTaskTypeDefinition(taskFormKey, false);
|
TypeDefinition typeDefinition = propertyConverter.getWorkflowObjectFactory().getTaskTypeDefinition(taskFormKey, false);
|
||||||
taskFormKey = typeDefinition.getName().toPrefixString();
|
taskFormKey = typeDefinition.getName().toPrefixString();
|
||||||
|
|
||||||
if(taskFormKey != null)
|
if (taskFormKey != null)
|
||||||
{
|
{
|
||||||
String processDefinitionKey = ((ProcessDefinition) ((TaskEntity)task).getExecution().getProcessDefinition()).getKey();
|
String processDefinitionKey = ((ProcessDefinition) ((TaskEntity)task).getExecution().getProcessDefinition()).getKey();
|
||||||
String defName = propertyConverter.getWorkflowObjectFactory().buildGlobalId(processDefinitionKey);
|
String defName = propertyConverter.getWorkflowObjectFactory().buildGlobalId(processDefinitionKey);
|
||||||
title = propertyConverter.getWorkflowObjectFactory().getTaskTitle(typeDefinition, defName, task.getName(), taskFormKey.replace(":", "_"));
|
title = propertyConverter.getWorkflowObjectFactory().getTaskTitle(typeDefinition, defName, task.getName(), taskFormKey.replace(":", "_"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(title == null)
|
if (title == null)
|
||||||
{
|
{
|
||||||
if (task.getName() != null)
|
if (task.getName() != null)
|
||||||
{
|
{
|
||||||
@@ -139,12 +139,20 @@ public class TaskNotificationListener implements TaskListener
|
|||||||
title = taskFormKey.replace(":", "_");
|
title = taskFormKey.replace(":", "_");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Make sure a description is present
|
||||||
|
String description = task.getDescription();
|
||||||
|
if (description == null || description.length() == 0)
|
||||||
|
{
|
||||||
|
// use the task title as the description
|
||||||
|
description = title;
|
||||||
|
}
|
||||||
|
|
||||||
// Send email notification
|
// Send email notification
|
||||||
workflowNotificationUtils.sendWorkflowAssignedNotificationEMail(
|
workflowNotificationUtils.sendWorkflowAssignedNotificationEMail(
|
||||||
ActivitiConstants.ENGINE_ID + "$" + task.getId(),
|
ActivitiConstants.ENGINE_ID + "$" + task.getId(),
|
||||||
title,
|
title,
|
||||||
task.getDescription(),
|
description,
|
||||||
task.getDueDate(),
|
task.getDueDate(),
|
||||||
Integer.valueOf(task.getPriority()),
|
Integer.valueOf(task.getPriority()),
|
||||||
workflowPackage,
|
workflowPackage,
|
||||||
|
Reference in New Issue
Block a user