-
Type:
Bug
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: 6.1.20 EE GA2
-
Component/s: Workflow, Workflow > API, Workflow > API > Kaleo Engine
-
Labels:None
-
Branch Version/s:6.2.x
-
Backported to Branch:Committed
-
Story Points:12
-
Git Pull Request:
In a Kaleo workflow definition, you can have email notifications.
Currently, you can have variables in the body of the email notification, but you can not add variables to the subject/description field of an email notification.
It is a simple change to allow variables in the subject/description field for email notifications of workflow definition. Paul Shemansky contributed this while working on workflow definitions for Liferay Foundation.
In plugins / webs / kaleo-web / docroot / WEB-INF / src / com / liferay / portal / workflow / kaleo / runtime / notification / NotificationUtil.java, replace:
- String notificationSubject = kaleoNotification.getDescription();
with the following lines:
+ String notificationSubject =
+ notificationMessageGenerator.generateMessage(
+ kaleoNotification.getKaleoClassName(),
+ kaleoNotification.getKaleoClassPK(),
+ kaleoNotification.getName(),
+ kaleoNotification.getTemplateLanguage(),
+ kaleoNotification.getDescription(), executionContext);
and then now, you can do something like this in your workflow definition:
<notification>
<name>request-rejected-notification</name>
+ <description><![CDATA[<#assign context = serviceContext.getAttribute("context")>${context.GRANT_TYPE} Request Rejected]]></description>
<template>