- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2017 07:25 AM
I am Calling an event in a runscript activity in aWOrkflow as follows:
gs.eventQueue('upoint_approval_notification',current,newstartTime,newendTime);
i was able to pass the parameters to the event and i want to pass these parameter to the Email notification
this is how i have written the notificaiton.:
Body:
A planned blackout for the ${current.variables.upb_client_id}, ${current.variables.upb_client_name} UPoint Production site will be in place from ${newstartTime} to ${newendTime}.
Please ignore any TMART monitors during that timeframe.
My issue is,
i wan to pass the parameter which i am geeting from the event to the email notification and send them to a group email. i have written like the above and the parameters are not getting displayed in the Email notification when i check the logs.
Can some one please help me with this,
Thanks.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2017 07:46 AM
Ursnani,
You should use a notification email script to pass the information from the event to the notification.
Covering our bases:
- Generate an event and pass the params of your choice.
- Create a notification email script to print the param of your choice
- Have a notification trigger off that very same event and call the notification email script in the body.
Example:
Let's say I have a business rule that triggers on incident state change and I pass the previous value in parm1 of the event.
I then have to create a notificaiton email script called "incident_previous_state" with the following:
(function runMailScript(current, template, email, email_action, event) {
template.print(event.parm1);
})(current, template, email, email_action, event);
Finally I add it into where I want the information to appear in the notification body using the following:
Previous State: ${mail_script:incident_previous_state}
Note: When using notification email scripts, you cannot place it into the subject like the normal field variables. There is a function you can use in notification email scripts to interact with the subject line.
Scripting for email notifications
Hope this helps!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2017 08:14 AM
Thanks Robert, It worked