Announcing the SAVIYNT KNOWLEDGE EXCHANGE unifying the Saviynt forums, documentation, training, and more in a single search tool across platforms. Click HERE to read the Announcement.

Email Template for Rule Modifications

angela
New Contributor III
New Contributor III

Hello,

We have configured a Rule Modification workflow and are working to generate an email template to notify a user group of an approval task. We are looking to identify a variable to get the rule name 'this_is_a_test' or even the request title/ 'Create Rule (380651:this_is_a_test)'.  Is this a variable we are capable of using within a template?

info.png

On the email template we placed the following variable 

${this.binding.variables.each {k,v -> println "$k = $v" + "<" + "br" + ">"}}

and got:

ServiceAccountOwnerMap = [:]
entitlements = []
accessapprovers = com.saviynt.ecm.workflow.Access_Approvers : 1254
ServiceAccountFlag = false
request = com.saviynt.ecm.workflow.ARS_Requests : 801
jbpm_activity_name = Rule Modification Approval
exceptionCount = 0
allApproversComments = null
fullhtmlassignedrows =
requestkey = 380859
roles = null
rejectedByMap = [:]
fullrowhtmltablerows =
out = java.io.PrintWriter@76253338
listofallrolesinrequest = []
assigneemanager = DQQQQQ000010
requesttype =
dynamicAttrsList = []
entitlementshtmltablerowsv2 =
approvallink = null/jbpmworkflowmanagement/showrequestdetails/Rule Modification Approval Workflow .380859
allrolesinrequest =
ServiceAccountType =
requestlink = null/jbpmworkflowmanagement/showrequestdetails/Rule Modification Approval Workflow .380859?reqid=801
email =
endpoints = ()
entitlementshtmltablerows =
allRejectorsComments = null
rolesshtmltablerows =
manager = DQQQQQ000010
approvedByMap = [:]
rolesApprovedOrRejected = []
rolename =
request_access = com.saviynt.ecm.workflow.Request_Access : 1227
entitlement_values = []
allApprovers = []
requestor = CQQQQQ000050
users = CQQQQQ000050
allRejectors = []
requestid = 380859
rolemap = [:]
assignee = DQQQQQ000010
activityname = Rule Modification Approval
accounts = []
user = CQQQQQ000050
curExecutionId = Rule Modification Approval Workflow .380859
accessItems = [com.saviynt.ecm.workflow.Request_Access : 1227]

[This post has been edited by a Moderator to correct a sentence at the authors request..]

3 REPLIES 3

rushikeshvartak
All-Star
All-Star

 

 

 

rushikeshvartak_0-1658868729149.png

<br>${accessItems.collect{it.request_access_attrss.findAll{it.attributeName.toString().equalsIgnoreCase('newJSON')} .collect{it.attributeName.toString() + ': ' + it.attributeValue}.join('###')}.toString().replaceAll('\\[','').replaceAll('\\]','').replaceAll('\\,','')}<br>


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

angela
New Contributor III
New Contributor III

That worked! Thanks Rushikesh!

angela
New Contributor III
New Contributor III

To pull out the Rule Name from the newJSON variable I did the following:

${accessItems.collect{ it.request_access_attrss.find{it.attributeName.toString().equalsIgnoreCase('newJSON')}.collect{it.attributeValue}}[0][0].split('"')[15]}