Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

SNOW Ticket: Pass list of entitlemements, TaskIds and roles

mbh_it
Regular Contributor II
Regular Contributor II

Hello Team,

 

We have a requirement for customer if we can pass following for Zero day ticket when pending tasks Created

1. All Tasks ID for a user, I want to send list in the same ticket: If yes, need variable, if now how to handle?

2. All Entitlements (I have seen ${allEntitlements} variable which can handle)

3. All list of roles.

 

The reason , we need taskIds is they will call saviynt API to complete the  tasks when the SNOW team assigns access assignment as the same process is used when Saviynt ServiceNow App is used for same app and request approval is done inside snow and a taskkey they can get and call closing tasks api for this, and to keep process same, we want to leverage this in similar fashion.

Also a query, how do SNOW App know if it is connected or disconnected system?

 

Thanks

Mahesh

7 REPLIES 7

rushikeshvartak
All-Star
All-Star
"httpParams":"{\"request_id\":\"${requestid}\"${if(taskIds != null && taskIds.size()>0){String result='';String result2='';String resultat3='';ArrayList arr = new ArrayList(taskIds);arr.eachWithIndex{val, idx ->com.saviynt.ecm.task.ArsTasks.get(val)?.tasktype==1?result=result.concat('{\"name\":\"'+com.saviynt.ecm.task.ArsTasks.get(val)?.entitlement_valueKey?.entitlement_value+'\"},'):com.saviynt.ecm.task.ArsTasks.get(val)?.tasktype==2?result2=result2.concat('{\"name\":\"'+com.saviynt.ecm.task.ArsTasks.get(val)?.entitlement_valueKey?.entitlement_value+'\"},'):'';};if (result.length()!=0){result=',\"roles_add\":['+result.substring(0, result.length() - 1)+']';};if(result2.length()!=0){result2=',\"roles_remove\":['+result2.substring(0, result2.length() - 1)+']';};if (result.length()!=0 && result2.length()!=0){result3=result+result2;}else {result3=result+result2;};return result3;}else{return '';}}}",

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

mbh_it
Regular Contributor II
Regular Contributor II

Hi Rushikesh,

Thanks for the quick response, I will try to integrate this and see how it goes. Once I verify I will confirm this.,

Thanks once again for the effort and help.

Thank you,

Mahesh

mbh_it
Regular Contributor II
Regular Contributor II

Hi @rushikeshvartak 

Thanks for the details, however upon looking this seems to be giving only roles list, I need taskIDs as well.

Also I have an issue where the flow is like

1) They use SNOW as ARS using servicenow App

2) Now to log onboarding tickets, we need to skip tasks(requests) which comes from SNOW (i.e in above step), 

So issue is if we log onboarding tickets and skip rest in httpParams, that will make the tasks generating from SNOW in error as WSRETRY will pick both tasks.

Need an idea for same on how to handle.

Thanks

Mahesh

mbh_it
Regular Contributor II
Regular Contributor II

For #2 query here, I have a solution while thinking more, I can filter only Birthright tasks for WSRETRY so only snow ticket will be logged, now remains open question

how to get all task IDs and push them to snow ?

All role IDs , I will try query given by @rushikeshvartak 

Appreciate inputs if anyone can guide me further.

Thanks,

Mahesh

${if(taskIds != null && taskIds.size()>0){String result='';ArrayList arr = new ArrayList(taskIds); arr.eachWithIndex{ val, idx -> com.saviynt.ecm.task.ArsTasks.get(val)?.entitlement_valueKey!=null?result=result.concat(com.saviynt.ecm.task.ArsTasks.get(val)?.tasktype==1?'ADD:: ':com.saviynt.ecm.task.ArsTasks.get(val)?.tasktype==31?'Extend End Date :: ':'REMOVE :: ').concat(com.saviynt.ecm.task.ArsTasks.get(val)?.entitlement_valueKey!=null?com.saviynt.ecm.task.ArsTasks.get(val)?.entitlement_valueKey?.entitlementtypekey.entitlementname+' : ':'').concat(com.saviynt.ecm.task.ArsTasks.get(val)?.entitlement_valueKey?.entitlement_value).concat(' : Access Start Date - ' + com.saviynt.ecm.task.ArsTasks.get(val)?.requestAccessKey?.startdate).concat(' : Access End Date - ' + com.saviynt.ecm.task.ArsTasks.get(val)?.requestAccessKey?.enddate).concat(' : Approved By - ' + com.saviynt.ecm.identitywarehouse.domain.Users.get(com.saviynt.ecm.task.ArsTasks.get(val)?.requestAccessKey?.collect{it.ae.findAll{it.jbpmActivityName.toString().equalsIgnoreCase('OwnerApproval')}}?.collect{it.approveby}.get(0).get(0)).displayname).concat('\\\\n'):'';}; return result}else{return '';}}

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

mbh_it
Regular Contributor II
Regular Contributor II

Hi @rushikeshvartak 

Thanks for the details, I will review and validate this, I believe this should solve it.

Thanks

Mahesh

Please confirm if this solved your issue


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