mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged BRANCHES/DEV/WF-NOTIFICATION to HEAD:
29508: Workflow Notification - First Cut * Notification service to consolidate sending of user notifications (kinds of notifications are provided by Sprung in notification providers) * EMail notification provider implementation (uses standard Email action to send email) * Frist cut workflow email template (still needs lots of details added) * AMP, etc for email template * Hook point within Activit and JBMP implementations * Property added to model (startTask) indicating whether email notifications should be sent * Hook points sensitive to property * Wf forms updated to show property 29703: Workflow Notification: * Remove AMP and replace with exploded XMl and template (easier to maintain) * Bootstrap updated * Patch added * Refactored hooks to use generic workflowTask object (tidies up helper methods) * I18n'ed messages * Task and work package information placed in template model * Email template built with reference to Lintons wire's (still needs some polish!) * Added Notification Servcice to Service Registry git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@29705 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -25,6 +25,7 @@ import java.util.List;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.repo.jscript.ScriptNode;
|
||||
import org.alfresco.repo.security.authority.AuthorityDAO;
|
||||
import org.alfresco.repo.workflow.WorkflowNotificationUtils;
|
||||
import org.alfresco.service.ServiceRegistry;
|
||||
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
||||
import org.alfresco.service.cmr.workflow.WorkflowException;
|
||||
@@ -195,17 +196,41 @@ public class AlfrescoAssignment extends JBPMSpringAssignmentHandler
|
||||
}
|
||||
}
|
||||
|
||||
//Determine whether we need to send email notifications of not
|
||||
Boolean sendEMailNotification = (Boolean)executionContext.getVariable(WorkflowNotificationUtils.PROP_SEND_EMAIL_NOTIFICATIONS);
|
||||
|
||||
//
|
||||
// make the assignment
|
||||
//
|
||||
if (assignedActor != null)
|
||||
{
|
||||
assignable.setActorId(assignedActor);
|
||||
|
||||
if (Boolean.TRUE.equals(sendEMailNotification) == true)
|
||||
{
|
||||
// Send the notification
|
||||
WorkflowNotificationUtils.sendWorkflowAssignedNotificationEMail(
|
||||
services,
|
||||
JBPMEngine.ENGINE_ID + "$" + executionContext.getTaskInstance().getId(),
|
||||
assignedActor,
|
||||
false);
|
||||
}
|
||||
|
||||
}
|
||||
if (assignedPooledActors != null)
|
||||
{
|
||||
assignable.setPooledActors(assignedPooledActors);
|
||||
}
|
||||
|
||||
if (Boolean.TRUE.equals(sendEMailNotification) == true)
|
||||
{
|
||||
// Send the notification
|
||||
WorkflowNotificationUtils.sendWorkflowAssignedNotificationEMail(
|
||||
services,
|
||||
JBPMEngine.ENGINE_ID + "$" + executionContext.getTaskInstance().getId(),
|
||||
assignedPooledActors,
|
||||
true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user