Click HERE to see how Saviynt Intelligence is transforming the industry. |
09/23/2024 02:45 AM
Hi All,
Once the Service Account request is submitted and we have attached all emails in workflow level. First it goes for Approval, and we are using below syntax to print service account owners/User Groups in email, but the same service account owner/User gruops syntax is not working when it moved to Grant Access (WF) completion email.
${ServiceAccountOwnerMap.get("USEROWNERS").get("ALL").collect{it.firstname}}${ServiceAccountOwnerMap.get("USERGROUPOWNERS").get("ALL").collect{it.user_groupname}}
1. Let me know any other syntax we can use in Grant Access completion email to print owners and groups.
2.How can I make a condition if service account has type as users, then print only owner and if the type is group, then it has to print only groups. The above syntax is printing in list format, and it is printing empty list if groups are not present.
Example if groups are not present: [abcsd,edffdjk],[ ]
Example if users are not present: [ ],[abcd group,ujhfg group]
tried below options but didn't work
${ServiceAccountOwnerMap.get("USEROWNERKEY").get("ALL").collect{it.username}}
${ServiceAccountOwnerMap.get("ALL")?.collect{it.firstname}?.join(',')}
${com.saviynt.ecm.identitywarehouse.domain.Users.findById(USEROWNERKEY)?.firstname}
09/23/2024 09:03 AM
Please validate supported variables.
Purpose :
To get what variables are present to use in the email template.
Email Template steps :
keep Advanced HTML CSS flag is checked
Keep your email Address in TO
TO /CC/BCC & Subject - Don't use any dynamic variables
Add only below code in Email Body
${this.binding.variables.each {RVkey,RVvalue -> println "$RVkey ------- $RVvalue" + "" + "br" + ">"}}
Output : using the below expression. By putting it in the email body, it will print all variable names with values, and then accordingly, you can use it:
09/24/2024 01:08 AM
Hi @rushikeshvartak ,
Below is the response of the template
[entitlements:[], USEROWNERKEYADDED:55269, 44393, jbpm_activity_name:Grant_Access, allApproversComments:null, fullrowhtmltablerows:, listofallrolesinrequest:[], approvedEntitlementsOwners:[], USERRANKJSON:{"55269":[1],"44393":[1]}, entitlementshtmltablerowsv2:, entitlementshtmltablerowsv3:, requestlink:null/jbpmworkflowmanagement/showrequestdetails/ServiceAccount_Add_Workflow.10837716?reqid=15436, accountnameprefix:svc-, allRejectorsComments:null, rolesApprovedOrRejected:[], rolename:, request_access:com.saviynt.ecm.workflow.Request_Access : 47504, users:A1107597, allRejectors:[], task:com.saviynt.ecm.task.ArsTasks : 422437, requestid:10837716, USEROWNERKEY:55269, 44393, rolemap:[:], accountnamesuffix:testingauth023, assignee:admin, activityname:Grant_Access, note:1 AccountName_Suffix should be between 3 and 16 characters 2 Click on Generate button to auto populate the Account Name using AccountName_Prefix and AccountName_Suffix attributes 3 At any point of time Service Account needs minimum of two Rank 1 owners of usertype, request:com.saviynt.ecm.workflow.ARS_Requests : 15436, Description:testing, applicationservicename:Alight Academy QA, ACCOUNTTYPE:Service Account, exceptionCount:0, fullhtmlassignedrows:, requestkey:10837716, rejectedEntitlementsOwners:[], roles:null, rejectedByMap:[:], out:java.io.PrintWriter@1ac87c58, requestedby:A1107597, assigneemanager:admin, endpoint:ServiceAccount_QAHewittNA, requesttype:New Account, dynamicAttrsList:[], change_control_group:Alight Academy Cornerstone OnDemand LMS Approvers, approvallink:null/jbpmworkflowmanagement/showrequestdetails/ServiceAccount_Add_Workflow.10837716, allrolesinrequest:, email:, endpoints:(Service Account QAHewittNA), entitlementshtmltablerows:, rolesshtmltablerows:, manager:Ah27165, approvedByMap:[:], ACCOUNTNAME:svc-testingauth023, entitlement_values:[], allApprovers:[], requestor:A1107597, ENDPOINT:1117, accounts:[[name:svc-testingauth023, obj:null]], user:A1107597, curExecutionId:ServiceAccount_Add_Workflow.10837716, accessItems:[com.saviynt.ecm.workflow.Request_Access : 47504]]
09/24/2024 10:33 AM
So you have to remove [] from output ?