Workflow 如何在Liferay 6.1的Kaleo工作流中以电子邮件形式发送博客和页面评论?
我可以发送有关新评论的通知,但我希望将评论作为电子邮件的一部分发送。以下是我目前得到的信息:Workflow 如何在Liferay 6.1的Kaleo工作流中以电子邮件形式发送博客和页面评论?,workflow,liferay,liferay-6,Workflow,Liferay,Liferay 6,我可以发送有关新评论的通知,但我希望将评论作为电子邮件的一部分发送。以下是我目前得到的信息: <notification> <name>Notification</name> <description>Notifies about new blog or page comments</description> <template> <![CDATA[ <p>
<notification>
<name>Notification</name>
<description>Notifies about new blog or page comments</description>
<template>
<![CDATA[
<p>
There's a new comment at page ${page_url} by ${user_name} :
<#if comment != "" >
<br /><strong>${comment}</strong>
</#if>
</p>
<p>With Love,<br /><strong>Liferay</strong></p>
]]>
</template>
<template-language>freemarker</template-language>
<notification-type>email</notification-type>
<recipients>
<role>
<role-type>regular</role-type>
<name>Portal Content Reviewer</name>
<auto-create>false</auto-create>
</role>
</recipients>
<execution-type>onEntry</execution-type>
</notification>
通知
通知有关新博客或页面评论的信息
${user\u name}在第${page\u url}页上有一条新注释:
${comment}
带着爱,
Liferay
]]>
自由标记
电子邮件
有规律的
门户内容审阅者
假的
奥涅特里
如何分配${page\u url}、${user\u name}和${comment}?Ok,$serviceContext提供了我所需要的一切。注意,我将模板语言更改为velocity。例如:
<template>
<![CDATA[
## All attributes
##set ( $debug = ${serviceContext.getAttributes()} )
## URL to page:
#set ( $url = ${serviceContext.getAttribute("contentURL")} )
##Latest comment
#set ( $body = ${serviceContext.getAttribute("body")} )
<p>
There's a new comment at page $url :
<br /><strong>$body</strong>
</p>
]]>
</template>
第$url页有一条新评论:
$body
]]>