07-26-2022
07:48 AM
- last edited on
07-26-2022
08:06 AM
by
Dave
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?
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..]
Solved! Go to Solution.
07-26-2022 01:52 PM
<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>
07-26-2022 01:57 PM
That worked! Thanks Rushikesh!
07-27-2022 01:24 PM
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]}