User Tools
Writing /app/www/public/data/meta/onboarding/ticketer/send_an_escalation_email.meta failed
onboarding:ticketer:send_an_escalation_email
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| onboarding:ticketer:send_an_escalation_email [2017/07/28 12:50] – created mmcc | onboarding:ticketer:send_an_escalation_email [2021/06/25 10:09] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Send an escalation email ====== | ||
| + | Author: Michelle McCausland | ||
| + | |||
| + | ===== Introduction ===== | ||
| + | |||
| + | This page will describe the implementation that is in place for the Vendor Certification project' | ||
| + | |||
| + | The aim of this is to provide a resource to work from should this behavior be required some where else. | ||
| + | |||
| + | In this context the email escalation refers to the following section of the workflow manager: | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | ---- | ||
| + | |||
| + | ===== Groovlet ===== | ||
| + | This task was undertaken as part of [[https:// | ||
| + | |||
| + | As of July 2017 the groovlet is located here: [[http:// | ||
| + | |||
| + | Here is the groovlet in it's entirety: | ||
| + | |||
| + | < | ||
| + | arg, defaultArg, ticket -> | ||
| + | | ||
| + | /* | ||
| + | SUPPORT-465 - Vendor Certification Esclation Emails | ||
| + | |||
| + | This groovlet is used to send a ticket email using a custom email template to a group of users who should be notified about a ticket. | ||
| + | |||
| + | If the groovlet fails to fully execute, any exceptions thrown will be sent to the " | ||
| + | */ | ||
| + | | ||
| + | log.info " | ||
| + | log.info " | ||
| + | log.info " | ||
| + | |||
| + | def customEmail = com.errigal.ticketer.CustomEmail | ||
| + | boolean emailSent = false | ||
| + | |||
| + | def emailService = com.errigal.ticketer.utils.DomainUtils.getGrailsService(' | ||
| + | |||
| + | com.errigal.ticketer.Ticket.withSession { sess-> | ||
| + | |||
| + | def entranceEmailName = " | ||
| + | |||
| + | /* Had to use getCustomEmailVOWithoutSecurityCheck as this does not check the security subejct | ||
| + | which for some reason is not being returned in the thread when using escalation as the groovlet type*/ | ||
| + | |||
| + | def emailVo = emailService.getCustomEmailVOWithoutSecurityCheck(ticket? | ||
| + | def email = customEmail? | ||
| + | def customEmailTemplate = new com.errigal.ticketer.mail.CustomEmailTemplate(email, | ||
| + | |||
| + | /* Setting the user string at this point as the user is not returned by the session */ | ||
| + | |||
| + | customEmailTemplate? | ||
| + | sess.flush() | ||
| + | |||
| + | try{ | ||
| + | emailService.sendEmail(customEmailTemplate) | ||
| + | log.info "<<<<<<<<<<<<<<<< | ||
| + | emailSent = true | ||
| + | } | ||
| + | catch(Exception e){ | ||
| + | log.error " | ||
| + | emailSent = false | ||
| + | } | ||
| + | |||
| + | if(!emailSent){ | ||
| + | throw new Exception(" | ||
| + | } | ||
| + | |||
| + | } | ||
| + | </ | ||