Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

How to Read Values from binding.variables

Shraddha
New Contributor III
New Contributor III

Hello Saviynters, 

I need to form a table in email body. 

Using below string in Email Template ,  ,   I am getting set of values however I need to pick only 3 values and put in table eg Endpoint NAme , Entitlement Value and User

Line in Email Template -> ${this.binding.variables.each {k,v -> println "$k = $v" + "<" + "br" + ">"}}  Gives below output

[entitlement_endpoint_list:[Active_Directory], manager:srahate, createdBy:admin, service_accounts_list:[], ownerOnTerminate:srahate, serviceaccount_endpoints_list:[], user:ppaulin, requestor:srahate, entitlement_value_list:[CN=Testval,OU=User Groups,OU=SystemUsers,DC=testdomain,DC=test,DC=local], out:java.io.PrintWriter@4c0e5a79]

How do I form a table , can someone guide please.

Best Regards

Shraddha Rahate

9 REPLIES 9

rushikeshvartak
All-Star
All-Star

<table border="1">
<tr>
<th>Endpoint Name</th>
<th>Entitlement Value</th>
<th>User</th>
</tr>
<tr>
<td>${this.binding.variables.get("entitlement_endpoint_list")[0]}</td>
<td>${this.binding.variables.get("entitlement_value_list")[0]}</td>
<td>${this.binding.variables.get("user")}</td>
</tr>
</table>


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Shraddha
New Contributor III
New Contributor III

Hello Rushikesh,

Thanks for information however meanwhile I tried this and worked so thought to share with you 

${this.ownerOnTerminate}

What if ,we have multiple values in this object , how to iterate the loop.

Best Regards

Shraddha Rahate

 

 

Shraddha
New Contributor III
New Contributor III

Hello Rushikesh,

I managed to iterate loop however when I set one user as owner for two entitlements and then i inactivate the user I am expecting to read both entitlements in email for Transfer Ownership.

In real what is happening is , whichever last entitlement I am updating only for that owner is getting updated.  Why so 

That will be great if you guide.

 

Best Regards

Shraddha Rahate

Share the latest response


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Hello Rushikesh,

Current Response is as bellow wherein entitlement list has two values in one []  . I have marked it in bold.  My plan is to iterate loop based on number of entitlements and number of Applications. If you have better suggestion then kindly share. 

entitlement_endpoint_list = [Active_Directory]
manager = somename
createdBy = admin
service_accounts_list = []
ownerOnTerminate = somename
serviceaccount_endpoints_list = []
user = duser
requestor = somename
entitlement_value_list = [ CN=eval,OU=User Groups,OU=SystemUsers,DC=domain,DC=domain,DC=local, CN=eval2,OU=Microsoft Exchange Security Groups,DC=domain,DC=domain,DC=local]
out = java.io.PrintWriter@115c3e64

Best Regards

Shraddha

<table style="width:80%;border:1px solid black;border-collapse:collapse"><tr> <th style="background: rgb(0, 0, 255);vertical-align: top;">Access Details</th> </tr> <% int count = Integer.parseInt("${entitlement.split(", ", 0).size()}"); for(int i = 0; i < count; i++) { %> <tr style="border:1px solid black;border-collapse:collapse"> <td style="border:1px solid black;border-collapse:collapse">${entitlement.split(", ", 0)[i].replaceAll("\\[","").replaceAll("\\]","")}</td> </tr> <% } %> </table>


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Hello Rushikesh,

I used this way , worked fine -

<tr><td>${this.entitlement_value_list[i]}</td></tr>

Best Regards

Shraddha

So final working solution was 

<table style="width:80%;border:1px solid black;border-collapse:collapse"><tr> <th style="background: rgb(0, 0, 255);vertical-align: top;">Access Details</th> </tr> <% int count = Integer.parseInt("${entitlement.split(", ", 0).size()}"); for(int i = 0; i < count; i++) { %> <tr style="border:1px solid black;border-collapse:collapse"> <td style="border:1px solid black;border-collapse:collapse">${this.entitlement_value_list[i]}</td> </tr> <% } %> </table>


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Hello Rushikesh,

 

Is there any option to fetch Entitlement Display Name and Description based on this entitlement Value?

 

Best Regards

Shraddha Rahate