How to send Notification after running a function
Table of Contents
|
Purpose:
Provide an option to send notification when a indicated function is triggered.
Create a Notification mail:
- Step 1: Following to Hệ thống -> Cấu hình & Tùy chọn -> Danh mục mẫu tin cảnh báo.
- Step 2: Click create new button.
- MVEL: You can add complementary code here. Read more about MVEL here
- TO, CC: Add recipents here.
- Chủ đề: Subject.
- Nội dung: Content.
Notify when a function or program is running.
- Create a script note in SaveProcess.
Script=:
:{
var notificationHelper = com.ftl.wak.mgr.NotificationHelper.getInstance();
var cn = action.getConnection();
var seu = new com.ftl.util.StringEscapeUtil();
var context = new java.util.HashMap();
context.put("seu",seu);
context.put("paramName",param);
notificationHelper.sendNotification(cn,context,"NOTIFY_EXAMPLE");
//NOTIFY_EXAMPLE is Code of your notification mail.
:}