Foren
Workflow / notifications
Eric COQUELIN, geändert vor 9 Jahren.
Workflow / notifications
Expert Beiträge: 254 Beitrittsdatum: 03.11.13 Neueste Beiträge
Dear all,
I have defined a workflow which includes user-notification and email notification types. It works correctly. No issue so far.
However, I'd like to customize the message being displayed when "user-notification", means from the dockbar. I can't put HTML otherwise it shows the tag. Example:
The template above works perfectly for email. But how could I add a link or some formatting to "user-notification" ?
I know there are notification handlers. There is also a workflowHandler which I configured. BUt how can I configure Liferay to say that this workflow should use this notificationHandler?
Thank you
I have defined a workflow which includes user-notification and email notification types. It works correctly. No issue so far.
However, I'd like to customize the message being displayed when "user-notification", means from the dockbar. I can't put HTML otherwise it shows the tag. Example:
#set($limit = $serviceContext.getAttribute("limit"))
#set($amount = $serviceContext.getAttribute("amount"))
#set($url = $serviceContext.getAttribute("url"))
<h1>Dear ${userName},</h1>
<p>Your mobile expenses show an expense of Rs${amount} while your agreed limit is Rs${limit}</p>
<p>Please visit <a href="${url}">${url}</a> and provide some explanations</p>
<p>Regards</p>
<p>Your management</p>
The template above works perfectly for email. But how could I add a link or some formatting to "user-notification" ?
I know there are notification handlers. There is also a workflowHandler which I configured. BUt how can I configure Liferay to say that this workflow should use this notificationHandler?
Thank you
Mehdi norouzi, geändert vor 9 Jahren.
RE: Workflow / notifications
New Member Beiträge: 20 Beitrittsdatum: 18.07.06 Neueste Beiträge
Hi
There is no extra configuration for creating user notification. you can use following code to create user notification:
NotificationEvent notificationEvent =
NotificationEventFactoryUtil.createNotificationEvent(
System.currentTimeMillis(), "your porttlet Name",
jsonObject);
UserNotificationEventLocalServiceUtil.addUserNotificationEvent(userId, notificationEvent);
There is no extra configuration for creating user notification. you can use following code to create user notification:
NotificationEvent notificationEvent =
NotificationEventFactoryUtil.createNotificationEvent(
System.currentTimeMillis(), "your porttlet Name",
jsonObject);
UserNotificationEventLocalServiceUtil.addUserNotificationEvent(userId, notificationEvent);
Eric COQUELIN, geändert vor 9 Jahren.
RE: Workflow / notifications
Expert Beiträge: 254 Beitrittsdatum: 03.11.13 Neueste Beiträge
If correctly understood, you suggest calling these algorithm from the <script> tag i/o using native notifications included with the workflow?