适用情况:非计划性的事件,即定义事件时有具体的object type
Detailed Description:
void sendNotification(String templateName,
boolean isUrgent,
List recipients,
String comments
) throws AgileDSLException
Send the notification regarding the current object.
This method can't be invoked in pre create object handler and post delete object handler.
Parameters:
templateName the name of the template you would like to send.
isUrgent set to true if the notification is urgent.
recipients a list of recipients.
comments comment you would like to send with the notification.
Exceptions:
AgileDSLException if the method fails
Script PX脚本:
import com.agile.agileDSL.ScriptObj.IBaseScriptObj
import com.agile.agileDSL.ScriptObj.AgileDSLException;
// add other import statements here
void invokeScript(IBaseScriptObj obj) {
try
{
List notifyList = new ArrayList();
notifyList.add("Xing xing");
//Send the notification to notifyList
obj.sendNotification("Account Active Notification",false,notifyList,"");
}
catch (Exception e)
{
e.printStackTrace();
throw new AgileDSLException(e);
}
}